Databases Reference
In-Depth Information
Attribute
Component of key
Entity
Relationship
Entity
Attribute
Multivalued attribute
1
Cardinality: 1
Identifying Relationship
N
Cardinality: N
Total participation
Weak entity
Attribute
Component of weak key
Figure 4-10. Quick summary of the ER diagram symbols
• The collection consists of albums.
• An album is made by exactly one artist.
• An artist makes one or more albums.
• An album contains one or more tracks
• Artists, albums, and tracks each have a name.
• Each track is on exactly one album.
• Each track has a time length, measured in seconds.
• When a track is played, the date and time the playback began (to the nearest sec-
ond) should be recorded; this is used for reporting when a track was last played,
as well as the number of times music by an artist, from an album, or a track has
been played.
There's no requirement to capture composers, group members or sidemen, recording
date or location, the source media, or any other details of artists, albums, or tracks.
The ER diagram derived from our requirements is shown in Figure 4-11. You'll notice
that it consists of only one-to-many relationships: one artist can make many albums,
one album can contain many tracks, and one track can be played many times. Con-
versely, each play is associated with one track, a track is on one album, and an album
is by one artist. The attributes are straightforward: artists, albums, and tracks have
names, as well as identifiers to uniquely identify each entity. The track entity has a time
attribute to store the duration, and the played entity has a timestamp to store when the
track was played.
 
Search WWH ::




Custom Search