ResourcesTo learn more
about database fundamentals, including ER modeling, we recommend the following books
Database Management Systems by Raghu Ramakrishnan and Johannes Gehrke
(McGraw-Hill).
•
Fundamentals of Database Systems by Ramez Elmasri and Shamkant B. Navathe
(Addison-Wesley).
•
Database Systems A Practical Approach to Design, Implementation and Manage-ment by Thomas M. Connolly and Carolyn E. Begg (Addison-Wesley).
Exercises1. When would you use a weak entity. Is it better to use entities instead of attributes. Alter and extend the music database ER model so that it can store compilations,
where a
compilation is an album that contains tracks by two or more different artists. Create an ER diagram for an online media store using the following requirements There are two types of product music CDs and video DVDs.
• Customers can buy any number
of each product For each CD, store the title, the artist’s name, the label (publisher, and the price. Also store the number, title, and length (in seconds)
of each track on theCD.
• For each video DVD, store the title the studio name, and the price.
Tables 4-1 and 4-2 contain some sample data to help you better understand the requirements.
Table 4-1. Video DVDsTitleStudioPriceLeon—The Professional
Sony Pictures
$21.99
Chicken Run
Dreamworks Video
$19.99
132 | Chapter 4:Modeling and Designing Databases Table 4-2. Music CDsTitleArtistLabelPriceCome Away With Me
Norah Jones
Blue
Note Records$11.99
Feels Like Home
Norah Jones
Blue Note Records
$11.99
The
Joshua TreeU2
Island
$10.99
Brothers in Arms
Dire Straits
Vertigo
$9.99
Table 4-3 contains a sample list of music CD track titles and length in seconds for the CD with the title Come Away With Me by the artist Norah Jones.
Table 4-3. TracksShare with your friends: