question 51
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
-The number of columns in the view CUST_SD is:
Definitions:
Infomercials
Long-form television commercials that are designed to educate and persuade viewers about a product or service, typically lasting longer than a traditional commercial.
Viral Advertising
A marketing strategy that relies on social networks and word-of-mouth to increase brand awareness rapidly.
Premium
Amount paid by the insured to the insurer to exchange for insurance coverage.
Institutional Advertisement
Promotional activities aimed at building a company's image and establishing long-term brand awareness rather than promoting a specific product.