23
DB-Queries-1.docx CSCI 2320 Initials ______ Page | 1 If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax, but you must organize and present your own logical solution to the problem. No lab is complete until the student submits the signed pledge form associated with that lab. I realize that no coded programs will be graded until I turn in the sign & pledge form associated with that program; any late penalties will continue to compound until the pledge form is submitted. If this lab is a team assignment, both team members may share logic as they program side by side on their own computers. Each person must type all of his/her own code as part of the learning process. Team assignments are never to be “You do this portion and I’ll do that portion” or “You do this lab and I’ll do the next lab”. Some of the lab assignments will have short answer questions. These short answer questions will be spot checked and graded for completion, but not checked for accuracy. I encourage you to get into a study group to help each other prepare for exams, quizzes, etc. Once these labs are graded and returned, I encourage you to compare answers with another class member, in your study group, who has also had the lab graded and returned. I/We realize that the penalty for turning in work that is not my own, or assisting others in doing so, can range from an "F" in the class to dismissal from Trinity University. I realize that it is a violation of academic integrity to share any portion of this lab with any person (outside my 3343 team & professor)! Print Name _________________________________________ Time Required = ______.____ Hrs. Signature _______________________________________________________________ (pledged) DB-Queries-1 - REVIEW Individual 20 Points ANSWER ALL SQL QUESTIONS USING MySQL Don't Forget The Semicolons At The End Of Statements! You may either hand write your solution or you may type the answers and print when you are finished. Connection & Theory 1] ___________________________________________________________________________________ Write the line of code to start MySQL, from the command line, in one of the cs labs. 2] ___________________________________________________________________________________ SQL is an acronym for _?_. 3] ___________________________________________________________________________________ How do you launch a windows command window. SHOW x 1] ___________________________________________________________________________________ Write the line of SQL code to display a list of all of the databases. 2] ______ {T/F} All SQL Queries are case sensitive. Create Database 1] ___________________________________________________________________________________Write the SQL command to create a database, called Trinity

DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 1

If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax, but you must organize and present your own logical solution to the problem. No lab is complete until the student submits the signed pledge form associated with that lab. I realize that no coded programs will be graded until I turn in the sign & pledge form associated with that program; any late penalties will continue to compound until the pledge form is submitted. If this lab is a team assignment, both team members may share logic as they program side by side on their own computers. Each person must type all of his/her own code as part of the learning process. Team assignments are never to be “You do this portion and I’ll do that portion” or “You do this lab and I’ll do the next lab”. Some of the lab assignments will have short answer questions. These short answer questions will be spot checked and graded for completion, but not checked for accuracy. I encourage you to get into a study group to help each other prepare for exams, quizzes, etc. Once these labs are graded and returned, I encourage you to compare answers with another class member, in your study group, who has also had the lab graded and returned. I/We realize that the penalty for turning in work that is not my own, or assisting others in doing so, can range from an "F" in the class to dismissal from Trinity University. I realize that it is a violation of academic integrity to share any portion of this lab with any person (outside my 3343 team & professor)!

Print Name _________________________________________ Time Required = ______.____ Hrs. Signature _______________________________________________________________ (pledged)

DB-Queries-1 - REVIEW Individual

20 Points

ANSWER ALL SQL QUESTIONS USING MySQL – Don't Forget The Semicolons At The End Of Statements!

You may either hand write your solution or you may type the answers and print when you are finished.

Connection & Theory

1] ___________________________________________________________________________________ Write the line of code to start MySQL, from the command line, in one of the cs labs.

2] ___________________________________________________________________________________ SQL is an acronym for _?_.

3] ___________________________________________________________________________________ How do you launch a windows command window.

SHOW x

1] ___________________________________________________________________________________ Write the line of SQL code to display a list of all of the databases.

2] ______ {T/F} All SQL Queries are case sensitive.

Create Database

1] ___________________________________________________________________________________Write

the SQL command to create a database, called Trinity

Page 2: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 2

2] ___________________________________________________________________________________Write

the SQL command to create a database, called Library?? (replace the ?? with your initials)

DROP DATABASE x

1] ___________________________________________________________________________________Write

the SQL Command to delete database LibraryTH.

2] ___________________________________________________________________________________Write

the SQL Command to delete database Trinity.

MySQL Workbench

1] Start the MySQL Workbench program. Print a screen capture, similar to the one above. Staple it to the back of this lab.

Page 3: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 3

2] Suppose we have LibrarySE.sql on the desktop . Write step by step directions that would be sufficient to remind

you how to use MySQL Workbench to import the contents of LibrarySE.sql into a database called Libraryth.

Use the MySQL workshop. Do This Now! _______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

_______________________________________________________________________________________

USE

1] ___________________________________________________________________________________Write

the line of SQL code to make LibraryTH the current database.

2] ___________________________________________________________________________________Write

the line of SQL code to make Trinity the current database.

CREATE TABLE

1] Now that Trinity is your current database, write the block SQL code to create table Universities; it is to

have an auto incrementing ID, a Name, a City, and a State.

Page 4: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 4

2] Write the SQL code to create to create the Users table (shown in the MySQL Workbench table above).

DESCRIBE x SHOW FIELDS IN x

1] Write the block of SQL code to add the Evan Barnett record, above, to the Users table.

Page 5: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 5

2] Write the block of SQL code to add the Laural Bean record, above, to the Users table.

3] Write the block of SQL code to add Trinity University to the Universities table.

USE LibrarySE For All Of Our Queries

Users Table

Page 6: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 6

SELECT * FROM

1] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users.

2] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Books.

SELECT COUNT(*) FROM

1] ___________________________________________________________________________________ Write

the line of SQL code to display the number of Users records.

2] ___________________________________________________________________________________ Write

the line of SQL code to display the number of University records.

3] ___________________________________________________________________________________ Write

the line of SQL code to display the number of Users records in which the Last name is not NULL.

do not use WHERE in the query!

SELECT * FROM WHERE ID ?

1] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose ID at least 20

2] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose ID is 20

3] Write the line of SQL code to display all of the information about all of the Users whose ID is at least 20

and no more than 40

4] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose ID is not 20

5] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose ID is an even number.

6] ___________________________________________________________________________________ Write

the line of SQL code to display the number of Users records whose ID is an odd number.

Page 7: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 7

SELECT * FROM WHERE Last Like

1] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose Last Name starts with

an 'A'

2] ___________________________________________________________________________________ Write

the line of SQL code to display all of the information about all of the Users whose Last Name starts with

an 'B'

3] ___________________________________________________________________________________ Write

the line of SQL code to display the number of Users records whose whose Last Name starts with a

'B'

4] Write the line of SQL code to display the number of Users records whose whose Last Name

contains a 'B'

SELECT x, y, z FROM

1] Write a query that displays the ID, First, Last, & FullName of all Users.

2] Write a query that displays the First, Last, & FullName, & ID of all Users.

3] Write a query that displays the ID, FullName, UserName, & Password of all Users Whose last name contains an 'A'

Page 8: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 8

SELECT * FROM ORDER BY

1] Write a query that displays all of the information in the Users table in order by FullName.

2] Write a query that displays the ID and FullName of all Users table in order by ID.

3] Write a query that displays the ID and FullName of all Users table in descending order by ID.

3] Write a query that displays the ID, First, & Last of all Users whose ID is in the range 10 – 20 order by FullName. DO NOT USE BETWEEN!

Page 9: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 9

4] Write a query that displays the ID, First, & Last of all Users whose ID is in the range 10 - 20 order by

FullName. USE BETWEEN!

5] Write a query that displays the ID, First, & Last of all Users whose ID in the range {2,4,6,8,…} in order by First name

6] Write a query that displays the ID, First, & Last of all Users whose ID in the range {3,6,9,12.,…} in descending order by Last.

7] Write a query that displays the ID, First, & Last of all Users whose ID are multiples of 2 or 5 in descending order by ID

Page 10: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 10

SELECT * FROM LIMIT X

1] ___________________________________________________________________________________ Execute the query below. Unfortunately, LIMIT is not supported in most databases, including MSSQL.

SELECT First

FROM Users LIMIT 3;

2] ___________________________________________________________________________________ Execute the query below. Unfortunately, LIMIT is not supported in most databases, including MSSQL.

SELECT First

FROM Users WHERE ID >= 10 LIMIT 3,2;

3] ___________________________________________________________________________________ The query below shows only the first user in the query view. Who is that person?

SELECT First

FROM Users LIMIT 0,1;

4] ___________________________________________________________________________________ The query below shows only the second user in the query view. Who is that person?

SELECT First

FROM Users LIMIT 1,1;

5] ___________________________________________________________________________________ The query below shows only the third user in the query view. Who is that person?

SELECT First

FROM Users LIMIT 2,1;

6] Write a query that displays all of the information about the twenty-first user in the Users table.

Query Output

1] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT 2 * 3 + 4 * 5

Page 11: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 11

2] ___________________________________________________________________________________ Write

the results from executing the query below:

SELECT 2 * (3 + 4) * 5

3] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT pow(2,8)

Concatenate

1] Write a query that will display the results of combining all of the First and Last names of all Users TomHicks

2] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT CONCAT (UserName, Password) FROM Users WHERE ID = 100

3] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT CONCAT ("One", "=", "Two")

Left & Right

1] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT Left ("Trinity University", 4)

2] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT Right ("Trinity University", 4)

Page 12: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 12

Update

1] Write a query that replaces the first name, of the record whose ID is 6, with Dan.

2] Write a query that replaces the passwd of all of the Users with 'trinity';

3] Write a query that replaces the UserNames of all of the Users with blank ('').

4] Write a query that replaces the UserNames of all of the Users with the first-last (dash between);

5] Write a query that replaces the FullName of all of the Users with the Last, First (comma blank between);

Page 13: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 13

UPPER UCASE

1] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT UCASE ("Trinity")

2] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT UPPER ("University")

3] Write a query that displays the first and last name of all Users using upper case letters.

LOWER LCASE

1] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT LCASE ("Trinity")

2] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT UPPER ("University")

3] Write a query that displays the first and last name of all Users using lower case letters.

4] Write a query that replaces the EMail of all of the Users with blank ('').

Page 14: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 14

5] Write a query that replaces the EMail of all of the Users with the UserName plus @trinity.edu (all lower case).

The UserName may be no more than 8 characters in length.

ASCII CHAR

1] ___________________________________________________________________________________ Write the output from the following query:

SELECT ASCII('A'), ASCII('C'), CHAR(65), CHAR(67);

FLOOR

1] ___________________________________________________________________________________ Write the output from the following query:

SELECT FLOOR(12.3), FLOOR(12.49), FLOOR(12.5), FLOOR(12.51), FLOOR(12.9)

CEILING

1] ___________________________________________________________________________________ Write the output from the following query:

SELECT CEILING (12.3), CEILING (12.49), CEILING (12.5), CEILING (12.51), CEILING (12.9)

RAND

1] Rand returns a random number that is in the range _______ <= X < _______

2] ___________________________________________________________________________________ Write a query that returns a random number in the range 1 to 5

3] ___________________________________________________________________________________ Write a query that returns a random number in the range 1 to 100

4] ___________________________________________________________________________________ Write a query that returns a random number in the range 10 to 20

Page 15: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 15

5] ___________________________________________________________________________________ Write

a query that returns a random number in the range -3 to +3

6-8] Write a query that replaces the Phone of all of the Users with some random value in the range (210) 999-0000 to (210) 999-9999

9-11] Write a query that replaces the Passwd of all of the Users with some random 5 character value in the range AAAAA to ZZZZZ

MID SUBSTRING

1] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT MID("Trinity", 4, 2)

2] ___________________________________________________________________________________ Write the results from executing the query below:

SELECT MID("UNIVERSITY", 5, 3)

3] Write a query that displays the fourth & fifth letters of the Last names of all Users. Do Not Use Substring

Page 16: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 16

4] Write a query that displays the fourth & fifth letters of the Last names of all Users. Do Not Use Mid

DELETE

1] Write a query that deletes all of the records in the University Table. Hint: There Is No *

2] Write the MySQL command which will delete the University whose ID is 10.

3] Write the MySQL command which will delete all of the Universities whose ID is an even number.

4] How do you undelete a record?

_____________________________________________________________________________

_____________________________________________________________________________

Page 17: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 17

USE LibrarySE For All Of Our Queries

Books Table

SUM

1] If you were to buy one copy of each of the books, what would it cost? Write the query for the calculation.

2] If you were to add all of the User ID's, what would be the total? Write the query for the calculation.

MIN

1] Write the query that would reveal the cost of the least expensive book.

Page 18: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 18

2] Write the query that would reveal the lowest User ID.

MAX

1] Write the query that would reveal the cost of the most expensive book.

2] Write the query that would reveal the lowest User ID.

Filling A Variable/Alias

1] Write a query that displays all information of the about those Users whose Last name begins with an H.

2] Write a query that fills a variable, called NoH, with the number of Users whose Last name begins with and H.

Page 19: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 19

3] Write the query that fills a variable, called MaxPrice, with the cost of the most expensive book.

4] _________ {T/F} Filling variables with the results of a Query is needed for both Web Applications and Stand Alone Database Applications.

Simple Joins

Table A = Table B =

1] _______________ What is the number of Rows in Table A?

2] _______________ What is the number of Columns in Table A?

3] ______________ x ______________ What are the dimensions of Table A? Hint: RC

4] _______________ What is the number of Rows in Table B?

5] _______________ What is the number of Columns in Table B?

6] ______________ x ______________ What are the dimensions of Table B? Hint: RC

7] ______________ x ______________ What are the dimensions of the Join A, B?

Hint: (NoRows A * NoRows B) by (NoCols A + NoCols B)

Page 20: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 20

8] Write the results from executing the query below:

SELECT * FROM A,B

Why Not Put The GradeLevel Into The Users Table? Why 2 Tables? OVER SIMPLIFIED

Users = GradeLevels =

Page 21: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 21

1] _______ Suppose we did the query below. How Many Of The Records Are Meaningful? Not 16!

SELECT users.ID, users.First, users.Last, users.GadeLevelID, gradelevels.ID, gradelevels.GradeLevel FROM Users, GradeLevels

2] _______ {T/F} The query below filters out the extraneous (non-relevant) data.

SELECT users.ID, First, Last, GradeLevel FROM Users, GradeLevels WHERE GadeLevelID = GradeLevels.ID

3] _______ {T/F} One of the reasons for creating the GradeLevels table is because we could add additional options, such as "Graduate – Masters" & "Graduate - PhD" later when appropriate. Web Applications & Stand Alone Applications could then select the choices from a drop-down ComboBox that is filled from the database table.

4] _______ {T/F} One of the reasons for creating the GradeLevels table is because not all users would spell each

of the choices correctly; selection from a drop-down ComboBox would be much more accurate. User data entry can be a problem.

5] _______ {T/F} One of the reasons for creating the GradeLevels table is because not all users would know all of

the chices choices correctly; selection from a drop-down ComboBox would be much more accurate. User data entry can be a problem.

6] _______ {T/F} One of the reasons for creating the GradeLevels table is because we can now execute queries

that contain integer searching (WHERE GradeLevelID = 2) as opposed to queries that contain string searching (WHERE GradeLevelID = "Sophomore"); numeric searching is faster!

7-8] List at least four reasons that our design would be enhanced because we added the GradeLevels table. 1] ___________________________________________________________________________________ _____________________________________________________________________________________

2] ___________________________________________________________________________________ _____________________________________________________________________________________

Page 22: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 22

3] ___________________________________________________________________________________

_____________________________________________________________________________________

4] ___________________________________________________________________________________ _____________________________________________________________________________________ 9-10] Write a query that will generate the following Data for all Users in order alphabetically as it would appear in a

phone directory. These should be your first six sets of data.

11-12] Write a query will display the number of times a user has checked out items during the month of January (1). Hint 80

13-14] Write a query will display the number of times Tom Hicks has checked out books. Hint 8

Page 23: DB-Queries-1 - REVIEWcarme.cs.trinity.edu/thicks/2320/Labs/DB-Queries-1.pdfDB-Queries-1.docx CSCI 2320 Initials _____ P a g e | 1 If this lab is an Individual assignment, you must

DB-Queries-1.docx CSCI 2320 Initials ______ P a g e | 23

15-18] Write a query will all of book titles that Tom Hicks has done in order by DateNo. Generate all of the records.

What To Turn In

1] All pages of this lab with questions completed.

- - - - - - - - - - - No Lab Is Complete Until Both Are Complete - - - - - - - - - - -

1] You sign & submit the Pledge form at the top of this lab!. No Lab Will Be Considered Complete until this is done. Late penalties will continue to accrue until the pledge form is submitted. a) Sign & Pledge

b) Record the amount of time you think you spent on this lab

c) Staple all pages of this lab. Fold in half length-wise (like a hot-dog). Put your name on the outside. Place it on the professor desk before the beginning of lecture

on the day it is due. The penalty for late homework will not exceed 25% off per day.

d) Short answer questions must be hand written, unless the professor has granted an exception for physical reasons.

2] Place all programming code associated with this program, if any, in the Professor’s Code Drop Box or on the Virtual System as directed.

I do not accept programs by mail; do not submit labs via email!