Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CUSTOMER In table CUSTOMER, CID is the primary key (Customer ID). RENTALS In the table RENTALS, RTN provides the rental number (the primary key), CID

CUSTOMER In table CUSTOMER, CID is the primary key (Customer ID). RENTALS In the table RENTALS, RTN provides the rental number (the primary key), CID is the customer's unique id, PICKUP is the city where the car was picked up, and Return is the city where the car was returned. RENTCOST RENTCOST shows the base cost of renting a given MAKE for one day. CITYADJ If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below. RENTLENGTH RENTLENGTH shows the number of days for the rental number (RTN) shown in table RENTALS. In a database used in reality, this table would be merged with the RENTALS table. SELECT CID, CNAME FROM CUSTOMER WHERE EXISTS (SELECT CID FROM RENTALS WHERE CUSTOMER.CID = RENTALS.CID AND PICKUP = 'CARY') The execution of this query lists the following CNAMEs:

BLACK, GREEN, JONES, MARTIN, SIMON
BLACK, JONES, MARTIN
BLACK, GREEN, JONES, MARTIN, SIMON, VERNON
BLACK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Describe the benefits that intangible assets provide to a company.

Answered: 1 week ago