question 24
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 CUST_SD.CNAME,RENTALS.DATE_OUT FROM CUST_SD,RENTALS
WHERE CUST_SD.CID = RENTALS.CID
AND CUST_SD.Cregion = RENTALS.RETURN
The number of rows displayed by this SELECT statement is:
Definitions:
Cash Disbursements
The outflow of cash for business expenses, acquisitions, or investments, documented within a specific period.
Raw Material Purchases
The acquisition of the basic substances or components that are used in the manufacturing process to produce finished goods.
Budgeted Sales
The forecasted sales for a specific period, serving as a key component of financial and operational planning.
Credit Sales
Transactions where goods or services are provided to a customer with the agreement that payment will be made at a later date.