13. case study

4
Team Activity #1 In this exercise you are going to model and implement the database-part of a (simplified) CD-archive. Requirements These are the requirements for your CD-archive: 1. A CD is published in a given year by a record company. The CD has a title. 2. A CD contains songs with a certain length and one or more artists plays and sings on it. 3. An artist is either a band or a person. A band is composed of multiple persons. 4. We assume that a person can’t be a member of more than one band, but a person might be an artist on his/her own as well. 5. An artist has a nationality. 6. A song is composed by one or more persons. It is interesting to know when a song was composed. 7. A song could be recorded on multiple records, generally with other artists than the composer (cover-tunes). 8. The length of each of the songs on a CD must be possible to retrieve. 9. To be able to pose questions to the record companies it is important to store contact information (email and phone no.) in the system

Transcript of 13. case study

Page 1: 13. case study

Team Activity #1

• In this exercise you are going to model and implement the database-part of a (simplified) CD-archive.

• Requirements

• These are the requirements for your CD-archive:

• 1. A CD is published in a given year by a record company. The CD has a title.

• 2. A CD contains songs with a certain length and one or more artists plays and sings on it.

• 3. An artist is either a band or a person. A band is composed of multiple persons.

• 4. We assume that a person can’t be a member of more than one band, but a person might be an artist on his/her own as well.

• 5. An artist has a nationality.

• 6. A song is composed by one or more persons. It is interesting to know when a song

was composed.

• 7. A song could be recorded on multiple records, generally with other artists than the

composer (cover-tunes).

• 8. The length of each of the songs on a CD must be possible to retrieve.

• 9. To be able to pose questions to the record companies it is important to store contact

information (email and phone no.) in the system

Page 2: 13. case study

Team Activity #1 Cont’d

ER-diagram

• A data model of the system must be made. This

ER-model must use notation as lectured.

• Remember to model all entity classes, relation

classes, cardinalities and (possibly)

dependabilities of existence and weak entity

classes.

Relational data model

• The data model must be translated to a relational

data model. It has to be written in SQL.

• The script must be executable.

Page 3: 13. case study

Activity 2

• (1) Construct an E-R diagram for a car-insurance company whose customers own one of more cars each. Each car has associated with it zero to any number of recorded accidents.

• (2) Construct an E-R diagram for a hospital with a set of patients and set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.

Page 4: 13. case study

Activity 3

• Consider a university database for the scheduling of classrooms for final exams. This database could be modeled as the single entity set exam, with attributes course-name, section-number, room-number, and time. Alternatively, one or more additional entity sets could be defined, along with relationship sets to replace some of the attributes of the exam entity set, as– Course with attributes name, department, and c-number– Section with attributes s-number and enrollment, and

dependent as a weak entity set on course– Room with attributes r-number, capacity, and building– (a) Show an E-R diagram illustrating the use of all three

additional entity sets listed– (b) Explain what application characteristics would influence

a decision to include or not to include each of the additional entity sets.