question 62
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
-UPDATE CUSTOMER SET AGE = AGE + 1
This command updates the following number of rows in the view CUST_SD:
Definitions:
Personal Judgments
Opinions or decisions formed by individuals based on personal feelings, tastes, or opinions, often without external input or influence.
Certainty
The state of being confident and free from doubt about something, often implying a high degree of belief in the accuracy or truth of an outcome or fact.
Fully Informed
Being fully informed means having all the necessary and relevant information or knowledge about a particular subject or situation before making decisions.
Objective Probability
A measure of the likelihood of an event occurring, based on factual data and statistical analysis rather than personal judgment.