Question 1 Report
A music store uses a relational database. Two of the tables are shown below.
ARTIST table:
| ArtistID | ArtistName | Country |
|---|---|---|
| A01 | The Waves | UK |
| A02 | Luna Rossa | Italy |
ALBUM table:
| AlbumID | AlbumTitle | ArtistID | Price |
|---|---|---|---|
| AL01 | Ocean Deep | A01 | 12.99 |
| AL02 | Rising Tide | A01 | 14.99 |
| AL03 | Midnight Sun | A02 | 11.50 |
(a) Identify the primary key in the ARTIST table. [1]
(b) Identify the foreign key in the ALBUM table. [1]
(c) State the type of relationship between the ARTIST table and the ALBUM table. [1]
(d) Explain why this is that type of relationship. [2]
(e) State two advantages of storing the data in two related tables rather than a single table. [2]
(a) The primary key in the ARTIST table is ArtistID. [1] It uniquely identifies each artist record.
(b) The foreign key in the ALBUM table is ArtistID. [1] It appears in the ALBUM table as a reference to the primary key in the ARTIST table, creating the link between the two tables.
(c) The relationship between the ARTIST table and the ALBUM table is one-to-many. [1]
(d) This is a one-to-many relationship because one artist [1] can have many albums. [1] For example, artist A01 (The Waves) has two albums: Ocean Deep (AL01) and Rising Tide (AL02). However, each album belongs to only one artist.
(e) Two advantages of storing the data in two related tables rather than a single table:
Everything you need to excel in your exams