varchar30 Primary key RID Foreign key CEmail references Customer CEmail Create

Varchar30 primary key rid foreign key cemail

This preview shows page 15 - 20 out of 21 pages.

varchar(30), Primary key (RID), Foreign key (CEmail) references Customer (CEmail)); Create Table Tools (TooLID int, RentalPrice int, OriginalPrice int, Deposit int, Primary Key (ToolID)); Create Table ReserveTools (RID int, TooLID int, Primary Key (RID,ToolID), Foreign Key (RID) references Reservation (RID), Foreign Key ToolID references Tools (ToolID)); 4 / 4 pts Question 20
Image of page 15
5/18/2020 Exam 3: DB Sys Concepts& Design - CS-6400-OAN 16/21 Which of the following clauses are mandatorily required in asyntactically correct SQL SELECT statement when querying adatabase table? a Select, a From and a Where clause a Select, a From, a Where, a Group By and an Order By clause a Select and a From clause a Select, a From, a Where and a Group By clause 0 / 4 pts Question 21 Incorrect Incorrect How many rows are returned by the following query? select distinct r.cemailfrom reservation r, reservation swhere r.cemail = s.cemail and (r.startdate - 4 / 4 ptsQuestion 22Hypothetically assume that none of the attributes in therelational schema are set as NOT NULL and that the existingprimary keys are utilized. Which of the following SQLstatements will correctly insert a new row into a table?
Image of page 16
5/18/2020 Exam 3: DB Sys Concepts& Design - CS-6400-OAN 17/21 7 / 7 ptsQuestion 23Consider the original database state. After executing thefollowing Update statement update Toolsset deposit = deposit * 0.5whereoriginalprice >2000and toolid not in (select toolid from reservetools);What would be the new state of the Tools table? (Enter youranswer as a whole number.)
Image of page 17
5/18/2020 Exam 3: DB Sys Concepts& Design - CS-6400-OAN 18/21 Answer 1: Answer 2: Answer 3: Answer 4: Answer 5: Answer 6: 103 30 800 60 104 40 1500 80 105 50 2200 100 106 30 800 60 107 70 3000 70 100 60 60 80 100 60
Image of page 18
5/18/2020 Exam 3: DB Sys Concepts& Design - CS-6400-OAN 19/21 Answer 7: 70 4 / 4 pts Question 24After the Tools table has been updated using the SQL in theprevious question, what toolid(s) would be returned by thefollowing query? (The previous button will allow you to revisitthe previous question.) Select toolid from tools wheredeposit > 65and deposit < 95;104 and 107 104 104, 106 and 107 105 No toolid(s) are returned 5 / 5 pts
Image of page 19
Image of page 20

You've reached the end of your free preview.

Want to read all 21 pages?

  • Fall '08
  • Staff
  • Proctortrack

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture