69.0k views
3 votes
A friend is interested in keeping track of information about his album collection. He is not concerned about whether or not the albums are CDs, tapes, LPs, etc. Also, assume that he does not have any compilation albums—that is, each album has songs from a single band. For each album, he wants to store which band recorded the album, the title, the year, and the chronology (e.g. this is the 4th album for that band). He also wants to store the songs, including title, length, track number, and writer(s). Of course, if two bands record the same song, they might have different track numbers and lengths. For each band (group or individual), he also wants to store the names of all of the band members. For each band member, he needs their first and last names and country of origin. Consider both band members and songwriters as musicians. Develop an ER diagram of the database.

1 Answer

4 votes

Answer:

The entities from the given question is stated as Band, Album, Song, Musician, Album_song.

The relationship for each entities were described as both one on one (1,1) or as one to many (1,M) for each of them.

Step-by-step explanation:

Solution:

From the given information, we developed the entities after normalizing to 3NF

The Entities are stated as follows:

  • Band
  • Album
  • Song
  • Musician
  • Album_ song (Associative entity)

The Relationship

Each band member is related to album as one to one (1,1) and one to many (1, M)

Each album has songs related as one to many (1, M) while many album has many songs in many to many (M,N) related to as an associative entity as a part of normalization to 3NF.

Associative entity should have a many many connector only always that, they don't have any primary keys on their own

Since Album as Band_id as a key foreign, then song is logically related to band.

Band members or writers have to be musicians.

Band has members as one to one (1, 1) as well as one to many (1,M).

Musicians (Writers or Band) is related to songs maybe as a writer as one to one (1,1) or one to many songs as (1, M).

Note: Kindly find an attached document of the ER diagram of the database below.

A friend is interested in keeping track of information about his album collection-example-1
User Anshul
by
3.9k points