Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CUSTOMER ( primary key = CID ) RENTALS ( primary key = RTN ) In the table RENTALS, RTN provides the rental number ( it

CUSTOMER (primary key = CID)
RENTALS (primary key = RTN)
In the table RENTALS, RTN provides the rental number (it is the primary key), CID refers to the CID in CUSTOMER, PICKUP is the city where the car was (or will be) picked up and Return is the city where the car was (or will be) returned, VIN is a foreign key that references the table CAR. The rental company has two branches, one in San Diego (SD) and one in Los Angeles (LA). Cars are picked up and returned by the customers at these two locations.
RENTCOST
In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CAR
The table CAR (primary key = VIN) provides information about each car, in particular if it is currently rented, and where its usual storage location is (attribute AT).
CREATE VIEW CUST_SD AS
SELECT * FROM CUSTOMER
WHERE Cregion ='SD'
CREATE VIEW CUST_40D AS
SELECT CNAME, RENTALS.MAKE, RENTCOST.COST
FROM CUSTOMER, RENTALS, RENTCOST
WHERE CUSTOMER.CID = RENTALS.CID
AND RENTALS.MAKE = RENTCOST.MAKE
AND RENTCOST <40
CREATE VIEW Make_View (Make, NumRentals, Cregion, Storageat) AS
SELECT RENTALS.MAKE, Count (RTN), Cregion, AT
FROM CUSTOMER, RENTALS, CAR
WHERE CUSTOMER.CID = RENTALS.CID
AND RENTALS.VIN = CAR.VIN
GROUP BY RENTALS.MAKE, Cregion, At
The view Make-View provides the following information:
Group of answer choices
The number of rentals per make
The number of rentals per make and storage place of the car
The number of rentals per make, customer region, and storage place of the car
Each car rented, how often, and where stored

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

Which two days appear to have the lowest transaction amounts?

Answered: 1 week ago