Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. Create a relationship diagram for the Employees database.

Similar presentations


Presentation on theme: "1. Create a relationship diagram for the Employees database."— Presentation transcript:

1 1. Create a relationship diagram for the Employees database

2 2. Has referential data integrity been violated between any of the tables? If so, name the tables and the orphans. Yes it is violated for the category/recording relationship– Recording IDs 36 and 37 are orphans because they have no parent on the Category table.

3 3. What are the possible primary keys for the Recordings table? Is one preferable to the other, why? Possible primary keys are RecordingID and Title. However, RecordingID is a better primary key because two recordings could have the same title.

4 4. Write a query to list Recording Titles for all Rock albums that have a discount or cost less than $10.

5 5. Write a query to List Recording Titles of all Alternative CDs that include bonus tracks and are priced between $10 and $20 inclusive.

6 6. Write a query to list Recording Titles that either have a discount or are Classical.

7 7. Write a query to display the value of all orders. List the Order #, Recording title, value of the order (price * quantity), and whether or not the artist offers a discount.

8 8. Using the previous query as input, write a query to display the orders that qualify for a discount. If the order qualifies for a discount 10% will be deducted from the selling value. Display the Order #, title of the recording, value of the order before the order, and the Discounted Price. Make sure to only display the orders that are eligible for a discount.

9 9. Write a query to summarize by Artist the number of different recordings we sell and their average selling price.


Download ppt "1. Create a relationship diagram for the Employees database."

Similar presentations


Ads by Google