Exam 10: Application Development With Views

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Figuer: CUSTOMER (primary key = CID) CNAME is NOT NULL CID CNAME AGE RESID\_CITY Cregion 10 BLACK 40 SD SD 20 GREEN 25 SD SD 30 JONES 30 La Mesa SD 40 MARTIN 35 LA LA 50 SIMON 22 Pomona LA 60 VERNON 60 Poway SD RENTALS (primary key = RTN) CID is a foreign key referencing CUSTOMER CID is NOT NULL MAKE is NOT NULL MAKE is a foreign key referencing RENTCOST CID MAKE DATE\_OUT PICKUP RETURN RTN 10 FORD 10- Oct-00 SD SD 1 10 GM 01- -Jan-01 SD LA 2 10 FORD 01- Feb-01 LA SD 3 20 NISSAN 07-Jul-00 SD 4 30 FORD 01-Jul-00 SD SD 5 30 GM 01- -Dec-00 SD SD 6 40 FORD 01- Aug-00 LA LA 7 50 GM 01- Sep-00 LA SD 8 60 NISSAN 02 -Jan-01 SD LA 9 RENTCOST MAKE is the primary key MAKE COST FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50 (Access) View1: SELECT RTN, MAKE, PICKUP, RENTALS.CID, CUSTOMER.CID, CNAME, AGE, Cregion FROM CUSTOMER INNER JOIN RENTALS ON CUSTOMER.CID = RENTALS.CID (Access) View2: SELECT RTN, MAKE, PICKUP, RENTALS.CID, CNAME, AGE, Cregion FROM CUSTOMER INNER JOIN RENTALS ON CUSTOMER.CID = RENTALS.CID (Access) View3: SELECT RTN, RENTALS.MAKE, PICKUP, RENTALS.CID, CNAME, AGE, Cregion, COST FROM (CUSTOMER INNER JOIN RENTALS ON CUSTOMER.CID = RENTALS.CID. INNER JOIN RENTCOST ON RENTALS.MAKE = RENTCOST.MAKE -(Access)UPDATE View1 SET MAKE = 'NISSAN',Cregion = 'LA' WHERE CNAME = 'BLACK' Which of the following is not true?

Free
(Multiple Choice)
4.9/5
(27)
Correct Answer:
Verified

D

Some modifications to updatable views can be problematic because they can cause an unexpected ______________ to occur when rows of the view disappear.

Free
(Short Answer)
4.7/5
(35)
Correct Answer:
Verified

side effect

The fixed part of a hierarchical form is known as the __________________.

Free
(Short Answer)
4.7/5
(34)
Correct Answer:
Verified

main form

A formatted display of a query which uses indentation to provide a visually appealing format to the user is a(n)______________.

(Short Answer)
4.9/5
(41)

When creating a hierarchical report,the groups are formulated using the GROUP BY clause in the SQL query formulation.

(True/False)
4.9/5
(31)

(Access)When implementing a hierarchical form,which of the following statements is not true?

(Multiple Choice)
5.0/5
(29)

Figuer: CUSTOMER (primary key = CID) CID CNAME AGE RESID\_CITY Cregion 10 BLACK 40 SD SD 20 GREEN 25 SD SD 30 JONES 30 La Mesa SD 40 MARTIN 35 LA LA 50 SIMON 22 Pomona LA 60 VERNON 60 Poway SD RENTALS (primary key = RTN) CID MAKE DATE\_OUT PICKUP RETURN RTN VIN DATE-IN 10 FORD 10-Oct-00 SD SD 1 F1 01-Dec-00 10 GM 01- Jan-01 SD LA 2 10 FORD 01- Feb-01 LA SD 3 20 NISSAN 07-Jul-00 SD 4 N1 30 FORD 01-Jul-00 SD SD 5 F2 30 -Nov-00 30 GM 01- -Dec-00 SD SD 6 G1 40 FORD 01- Aug-00 LA LA 7 F3 50 GM 01- Sep-00 LA SD 8 G2 60 NISSAN 02 -Jan-01 SD LA 9 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 COST FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50 In RENTCOST, COST shows the base cost of renting a given MAKE for one day. CAR VIN MAKE RENTED AT F1 FORD NO SD F2 FORD NO SD F3 FORD YES IR F4 FORD NO LA G1 GM YES SD G2 GM YES SD N1 NISSAN YES LA N2 NISSAN NO LA T1 TOYOTA NO IR T2 TOYOTA NO IR V1 VOLVO NO LA V2 VOLVO NO 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 rows in the view Make-View is:

(Multiple Choice)
4.7/5
(31)

A modification query may cause rows in a view to disappear if a column in the WHERE clause of the view definition is changed by an UPDATE statement.

(True/False)
4.8/5
(34)

The motivations for using views are that they support data independence,simplify query formulation,and provide flexible security.

(True/False)
4.7/5
(40)

In a 1-M updatable query,you cannot insert a row into the parent table without also inserting a corresponding row into the child table.

(True/False)
4.9/5
(43)

SQL:1999 specifies that a view can be used in any query.

(True/False)
4.9/5
(30)

In __________________,a query using a view is translated into a query using base tables by replacing references to the view with its definition.

(Short Answer)
5.0/5
(28)

Views are the "building blocks" of both data entry forms and reports.

(True/False)
4.9/5
(28)

Which of the following statements is not true about the fields in a form?

(Multiple Choice)
4.8/5
(35)

In Access,a(n)_____________________ query involves two tables,with one table playing the role of parent and another table playing the role of child.

(Short Answer)
4.9/5
(41)

A virtual table whose rows do not exist until they are derived from the base table(s)is called a(n)___________.

(Short Answer)
5.0/5
(33)

Figuer: CUSTOMER (primary key = CID) CID CNAME AGE RESID\_CITY Cregion 10 BLACK 40 SD SD 20 GREEN 25 SD SD 30 JONES 30 La Mesa SD 40 MARTIN 35 LA LA 50 SIMON 22 Pomona LA 60 VERNON 60 Poway SD RENTALS (primary key = RTN) CID MAKE DATE\_OUT PICKUP RETURN RTN VIN DATE-IN 10 FORD 10-Oct-00 SD SD 1 F1 01-Dec-00 10 GM 01- Jan-01 SD LA 2 10 FORD 01- Feb-01 LA SD 3 20 NISSAN 07-Jul-00 SD 4 N1 30 FORD 01-Jul-00 SD SD 5 F2 30 -Nov-00 30 GM 01- -Dec-00 SD SD 6 G1 40 FORD 01- Aug-00 LA LA 7 F3 50 GM 01- Sep-00 LA SD 8 G2 60 NISSAN 02 -Jan-01 SD LA 9 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 COST FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50 In RENTCOST, COST shows the base cost of renting a given MAKE for one day. CAR VIN MAKE RENTED AT F1 FORD NO SD F2 FORD NO SD F3 FORD YES IR F4 FORD NO LA G1 GM YES SD G2 GM YES SD N1 NISSAN YES LA N2 NISSAN NO LA T1 TOYOTA NO IR T2 TOYOTA NO IR V1 VOLVO NO LA V2 VOLVO NO 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:

(Multiple Choice)
4.9/5
(29)

The following SQL2 command is executed: CREATE VIEW CUST_SD2 AS SELECT * FROM CUSTOMER WHERE Cregion = 'SD' WITH CHECK OPTION There is a request to execute the following SQL2 command: UPDATE CUST_SD2 SET AGE = AGE +1,Cregion = 'LA' WHERE CNAME = 'BLACK' Select the most appropriate statement:

(Multiple Choice)
4.9/5
(31)

Figuer: CUSTOMER (primary key = CID) CID CNAME AGE RESID\_CITY Cregion 10 BLACK 40 SD SD 20 GREEN 25 SD SD 30 JONES 30 La Mesa SD 40 MARTIN 35 LA LA 50 SIMON 22 Pomona LA 60 VERNON 60 Poway SD RENTALS (primary key = RTN) CID MAKE DATE\_OUT PICKUP RETURN RTN VIN DATE-IN 10 FORD 10-Oct-00 SD SD 1 F1 01-Dec-00 10 GM 01- Jan-01 SD LA 2 10 FORD 01- Feb-01 LA SD 3 20 NISSAN 07-Jul-00 SD 4 N1 30 FORD 01-Jul-00 SD SD 5 F2 30 -Nov-00 30 GM 01- -Dec-00 SD SD 6 G1 40 FORD 01- Aug-00 LA LA 7 F3 50 GM 01- Sep-00 LA SD 8 G2 60 NISSAN 02 -Jan-01 SD LA 9 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 COST FORD 30 GM 40 NISSAN 30 TOYOTA 20 VOLVO 50 In RENTCOST, COST shows the base cost of renting a given MAKE for one day. CAR VIN MAKE RENTED AT F1 FORD NO SD F2 FORD NO SD F3 FORD YES IR F4 FORD NO LA G1 GM YES SD G2 GM YES SD N1 NISSAN YES LA N2 NISSAN NO LA T1 TOYOTA NO IR T2 TOYOTA NO IR V1 VOLVO NO LA V2 VOLVO NO 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 rows in the view CUST_SD is:

(Multiple Choice)
4.8/5
(28)

Views that can be used only with SELECT statements are known as __________ views.

(Short Answer)
4.7/5
(40)
Showing 1 - 20 of 75
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)