0% found this document useful (0 votes)
21 views

Tutorial 4

The document describes two entity relationship diagrams (ERDs) and provides four table design options for each. For the first ERD showing the relationship between artists and songs, option c) is the correct table design that conforms to the ERD, with each artist associated with zero or many songs through the foreign key, and each song associated with only one artist. For the second ERD showing the relationship between courses and instructors, option d) is the correct table design that conforms to the ERD, with each instructor associated with one or many courses through the foreign key, and each course associated with only one instructor.

Uploaded by

Sadiqu Zzaman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Tutorial 4

The document describes two entity relationship diagrams (ERDs) and provides four table design options for each. For the first ERD showing the relationship between artists and songs, option c) is the correct table design that conforms to the ERD, with each artist associated with zero or many songs through the foreign key, and each song associated with only one artist. For the second ERD showing the relationship between courses and instructors, option d) is the correct table design that conforms to the ERD, with each instructor associated with one or many courses through the foreign key, and each course associated with only one instructor.

Uploaded by

Sadiqu Zzaman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CT042-3-1-Introduction to Databases ERD

Which table design conformed to the above entity relationship diagram (ERD)?

a)

ArtistID (PK) Name SongID (FK) SongID (PK) Name


A01 M.Jackson S02 S01 Beat It
A02 C.Dion S01 S02 Power of Love
A03 J.Legend S03 S03 All of Me

b)

ArtistID (PK) Name SongID (PK) Name ArtistID (FK)


A01 M.Jackson S01 Beat It A01
A02 C.Dion S02 Power of Love A02
A03 J.Legend S03 Black or White A01
A04 Vin Diesel S04 All of Me A03
c)

ArtistID (PK) Name SongID (PK) Name ArtistID (FK)


A01 M.Jackson S01 Beat It A01
A02 C.Dion S02 Power of Love A02
A03 J.Legend S03 All of Me A03

d)

ArtistID (PK) Name SongID (FK) SongID (PK) Name


A01 M.Jackson S01 S01 Beat It
A02 C.Dion S02,S04 S02 Power of Love
A03 J.Legend S03 S03 All of Me
S04 My Heart Will Go On

Therefore, based on the above design:

Level 1 Asia Pacific University of Technology & Innovation Page 1 of 3


CT042-3-1-Introduction to Databases ERD

Each ArtistID is associated to zero or many SongID, but each SongID is only associated to 1 ArtistID

Which table design conformed to the above entity relationship diagram (ERD)?

a)

CourseID (PK) Name IntructorID (FK) IntructorID (PK) Name


C01 ISWE IN02 IN01 Ali
C02 SDP IN01 IN02 Tan
C03 INT IN03 IN03 Kumar

b)

CourseID (PK) Name IntructorID (PK) Name CourseID (FK)


C01 ISWE IN01 Ali C02
C02 SDP IN02 Tan C01
C03 INT IN03 Kumar C03, C04
C04 RMCT

c)

CourseID (PK) Name IntructorID (FK) IntructorID (PK) Name


C01 ISWE IN02 IN01 Ali
C02 SDP IN01 IN02 Tan
C03 INT IN01 IN03 Kumar
C04 RMCT IN03

d)

CourseID (PK) Name IntructorID (PK) Name CourseID (FK)


C01 ISWE IN01 Ali C02
C02 SDP IN02 Tan C01
C03 INT IN03 Kumar C03
C04 RMCT IN04 Lee C03

Therefore, based on the above design:

Level 1 Asia Pacific University of Technology & Innovation Page 2 of 3


CT042-3-1-Introduction to Databases ERD

Each IntructorID is associated to 1 or many CourseID, but each CourseID is only associated to 1
IntructorID

Therefore, based on the above design:

Each ProfessorID is associated to min 1 or max 4 classes. ClassID is associated to 1 and only 1 ProfessorID

Level 1 Asia Pacific University of Technology & Innovation Page 3 of 3

You might also like