Professional Documents
Culture Documents
Sample Examination
Question 1
A real estate company uses a database to store information about customers, property, and contracts.
The following relations are used in the database:
Customer: Customer number (unique), name, mailing address, Balance, lawyer name, Discount.
Contract: Customer number (unique), Agent number (unique), Property_ID (one per contract), Date of
contract, Property addresses, Property value, Type, Number of rooms, Land size, Built size, Tax value)
Transform these relations into 3NF (please use only the attributes described above, and do not add any
new attributes).
Question 2
Draw a class diagram for the following situation.
An airline company has a number of planes. The attributes of a plane include plane_id (unique), name,
and vendor. The airline company serves many destinations. The attributes of a destination include
destination_id (unique), name, and flight_date. Each plane flies to one or more destinations; or it may
be used as back-up; or it may be under maintenance, and therefore will not fly to any destination. For
each plane undergoing maintenance, the company records the name of the technician and the type of
maintenance performed. A destination may be served by one or more planes. Each plane’s service
Question 3
Consider the following three relations:
Question 4
Consider the following database.
a. Write an SQL query to display the names of all travel agents who arranged trips for customer “John
Smith”.
b. Define indexes on selected attributes to speed up your query. Justify your selections.
Question 5
Suggest an appropriate recovery technique for each of the following situations.
a. You were working from home and updating a database at work when the transaction was aborted.
b. A customer service representative entered an incorrect data price for a customer transaction.
Several weeks after the accounting department has processed the transaction, the customer
returned and discovered the mistake.
Question 7
a. Briefly contrast transient data with periodic data in data warehousing.
b. Briefly discuss the characteristics of a surrogate key, as used in a data warehouse or data mart.