question 17
Multiple Choice
Figuer:
CUSTOMER (primary key = CID) CID 102030405060 CNAME BLACK GREEN JONES MARTIN SIMON VERNON AGE 402530352260 RESID_CITY SD SD La Mesa LA Pomona Poway Cregion SD SD SD LA LA SD RENTALS (primary key = RTN) CID 101010203030405060 MAKE FORD GM FORD NISSAN FORD GM FORD GM NISSAN DATE_OUT 10-Oct-00 01− Jan-01 01− Feb-01 07−Jul−0001−Jul−0001−-Dec-00 01− Aug-00 01− Sep-00 02-Jan-01 PICKUP SD SD LA SD SD SD LA LA SD RETURN SD LA SD SD SD LA SD LA RTN 123456789 VIN F1 N1 F2 G1 F3 G2 DATE-IN 01-Dec-00 30-Nov-00 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 MAKE FORD GM NISSAN TOYOTA VOLVO COST 3040302050 In RENTCOST, COST shows the base cost of renting a given MAKE for one day.
CAR VIN F1 F2 F3 F4 G1 G2 N1 N2 T1 T2 V1 V2 MAKE FORD FORD FORD FORD GM GM NISSAN NISSAN TOYOTA TOYOTA VOLVO VOLVO RENTED NO NO YES NO YES YES YES NO NO NO NO NO AT SD SD IR LA SD SD LA LA IR IR LA LA 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
-SELECT * FROM CUST_40D WHERE COST = 40 The number of rows displayed by this SELECT statement is:
Definitions:
Depreciation
The process of allocating the cost of a tangible asset over its useful life to account for declines in value over time.
Matching Statements
Accounting principles that dictate expenses should be matched with the revenues they helped to generate, ensuring accurate income statements.
Appropriate Terms
Relevant and suitable terms or phrases used in a particular context, especially in legal or formal documents.
Letter Code
A Letter Code is a system of symbols or characters used to represent specific information, often used for confidentiality, identification, or simplification purposes.