Exam 10: Application Development With Views
Exam 1: Introduction to Database Management76 Questions
Exam 2: Introduction to Database Development76 Questions
Exam 3: The Relational Data Model75 Questions
Exam 4: Query Formulation With SQL75 Questions
Exam 5: Understanding Entity Relations76 Questions
Exam 6: Developing Data Models for Business Databases75 Questions
Exam 7: Normalization of Relational Tables76 Questions
Exam 8: Physical Database Design76 Questions
Exam 9: Advanced Query Formulation With SQL74 Questions
Exam 10: Application Development With Views75 Questions
Exam 11: Stored Procedures and Triggers76 Questions
Exam 12: View Design and Integration76 Questions
Exam 14: Data and Database Administration76 Questions
Exam 15: Transaction Management75 Questions
Exam 16: Data Warehouse Technology and Management78 Questions
Exam 17: Client-Server Processing and Distributed Databases76 Questions
Exam 18: Object Database Management Systems83 Questions
Select questions type
In a 1-M updatable query,update operations are supported on the parent table even if the query does not contain the primary key of the parent table.
(True/False)
4.8/5
(28)
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)INSERT INTO View2 (RTN,MAKE,PICKUP,RENTALS.CID.
VALUES (10,'GM','SD',10)
Which of the following is not true?
(Multiple Choice)
4.8/5
(40)
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 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:
(Multiple Choice)
4.9/5
(32)
For each Cregion,you want to show each customer (CNAME),and for each customer,each rental ordered by Make,showing PICKUP,RETURN and DATE-OUT.Which of the following would be a group in a hierarchical report?
(Multiple Choice)
4.9/5
(30)
A view that can be used in SELECT,UPDATE,INSERT,and DELETE statements is a(n)_________________.
(Short Answer)
4.9/5
(41)
In a data warehouse environment,views are materialized on demand,i.e.when the view query is submitted.
(True/False)
4.9/5
(40)
Typically in a hierarchical form,data in the main form may be non-updatable.
(True/False)
4.7/5
(38)
The same rules of updatability apply to 1-M queries with more than two tables,but you must apply the rules to each join in the query.
(True/False)
4.8/5
(30)
A view that can be used only in SELECT statements is a(n)______________________.
(Short Answer)
4.8/5
(36)
_____________ is a formatted display of a query using indentation to show grouping and sorting.
(Multiple Choice)
4.8/5
(31)
Typically in a hierarchical form,which of the following statements is not true?
(Multiple Choice)
4.8/5
(38)
Depending on its definition,a view can be read-only or updateable.All views are at least __________.
(Short Answer)
4.9/5
(42)
To be updatable,a single-table view cannot contain the keywords ____________ or ____________ in the view definition.
(Short Answer)
4.8/5
(37)
To process queries that reference a view,the DBMS can use either a _________ or __________ strategy.
(Multiple Choice)
4.9/5
(36)
To process queries that reference a view,____________________ is not usually the best strategy because it requires the DBMS to execute two queries.
(Short Answer)
4.9/5
(30)
A formatted window for data entry and display which is comprised of a fixed part and a variable part is called a(n)___________________.
(Short Answer)
4.8/5
(37)
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)Which of the following statements is true?
(Multiple Choice)
5.0/5
(36)
Showing 21 - 40 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)