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
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
-UPDATE CUSTOMER SET AGE = AGE + 1
This command updates the following number of rows in the view CUST_SD:
(Multiple Choice)
4.9/5
(41)
One of the rules for 1-M updatable queries states that the ________________ of the parent tables must be either a primary key or some other unique specification.
(Short Answer)
4.8/5
(36)
The ________________ clause of the CREATE VIEW statement prevents UPDATE and INSERT statements that violate a view's WHERE clause from executing.
(Short Answer)
4.8/5
(37)
In a hierarchical form,the fixed part is called the parent form and the variable part is called the child form.
(True/False)
4.9/5
(36)
A method to process a query on a view by executing the query directly on the stored view is known as _____________________.
(Short Answer)
4.8/5
(38)
You want to create a form to process the rentals of a given customer.You would like to include the Cost of the Make.Select the most appropriate statement:
(Multiple Choice)
4.8/5
(34)
One of the advantages of views is __________________,meaning if an application accesses the database through a view,most changes to the conceptual schema will not affect the application.
(Short Answer)
4.8/5
(38)
The variable part of a hierarchical form is known as the __________________.
(Short Answer)
4.8/5
(36)
To define a view,SQL provides the __________________ statement,in which you identify the view name and the underlying SELECT statement.
(Short Answer)
4.8/5
(35)
In a hierarchical form involving a 1-M relationship,only columns from the two tables involved in the relationship can be displayed in the form.
(True/False)
4.9/5
(33)
You can rename some of the columns,all of the columns,or none of the columns in a view using parentheses after the view name.
(True/False)
4.9/5
(30)
To use a view in a query instead of a base table,you would use the view name in the _____________ and the view columns in other parts of the query statement.
(Short Answer)
4.8/5
(35)
A single-table view is not updatable if all of the columns of the base table are not included in the view.
(True/False)
4.9/5
(33)
Showing 61 - 75 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)