EEROracle PDF
EEROracle PDF
Answer
1p per found error, max 6p
Relations are represented by a square with a name in it.
You cant connect entities with attributes.
All entities must have a key attribute.
Attributes can be composite, but they cant have attributes of their own.
Entities cant share attributes
The Office name attribute does not have anything to do with a department.
The Office name attribute should be on the Office entity.
Its not possible to model the items like this, an entity can only have a finite number of attributes.
The Customer attribute List of all should not be an attribute on customer.
List of all should be an N:M relation.
2p for a correct ER-diagram
2. EER to relations (6p)
This EER-diagram describes the mini-world of a riding school. There are people (e.g. employees), horseowners that
own horses, and students thatat certain datesparticipate in riding classes. Translate the EER-schema to a relational
schema. Explain and motivate how the mapping is done.
Answer
This EER-diagram describes the mini-world of a riding school. There are people (e.g. employees), horseowners that
own horses, and students thatat certain datesparticipate in riding classes.
Person
Horseowner
ID
telephone
street
postcode
Town
ID
Person(ID)
The number of owned horses is a derived attributed and not reflected in the created tables. It can be calculated by
joining the Horseowner and Horse table.
Projects have a project number, a sponsor name, a starting date, an ending date, and a
budget.
Graduate students have SSN, a name, an age, and a degree program (e.g., M.S. Or Ph.D.).
Each project is managed by one professor (known as the projects principal investigator).
Each project is worked on by one or more professors (known as the projects coinvestigators).
Professors can manage and/or work on multiple projects.
Each project is worked on by one or more graduate students (known as the projects research assistants).
When graduate students work on a project, a professor must supervise their work on the project. Graduate students
can work on multiple projects, in which case they will have a (potentially different) supervisor for each one.
Departments have a department number, a department name, and a main office.
Departments have a professor (known as the chairman) who runs the department.
Professors work in one or more departments, and for each department that they work in, a time percentage is
associated with their job.
Graduate students have one major department in which they are working on their degree.
Create an ER/EER diagram that fulfils the above requirements and motivate your suggestions. The exercise will be
assessed both according to correct ER/EER syntax and whether you have made a good design.
Answer
Here is a possible solution:
Additional comments/assumptions:
It has been assumed that sets of students and professors are disjoint.
Works on is a ternary relation. This allows for relating a particular student to a particular supervisor in the
context of a particular project.
It has been assumed that one professor can be a head of at most one department.
Every department has its chairman, and at least one professor (the chairman) employed, thus two total relationships
(double lines).
Each project has a principal investigator, one or more co-investigators and students working on it, therefore total
participation relationships.
Every student has a major department she/he works in, but its not clear whether the students work in every
department, thus in the Works at relationship a double line from Student side and a single one from the department
side.
4. EER to relational schema (4p)
Translate the following EER diagram to a relational schema. Explain how the mapping is done and if you choose to do
anything differently than in the book make sure that you give a good motivation. Remember that it is not just the
finished relational schema that determines your result it is just as much about your assumptions and motivations.
Museums of Paris, 2004, for instances, takes place twice: May 22nd to May 29th, 2004 and June 5th to June 12th,
2004. The cost of a tour depends on the date, e.g. Museums of Paris, 2004 was cheaper in May than in June. Each
travel such as Museums of Paris, 2004 at June 5th to June 12th, 2004 is lead by one organizer.
Members participate in travels.
Travel-Often-And-A-Lot wants to keep track of the payments made by its members. A payment can e.g. be the annual
club fee, a donation, etc. but also the payment for a travel.
Mind the subtle distinction between tour and travel.
Draw the EER-diagram for this mini world description. State any additional assumptions that you make.
Example solution (one of many):
The database should store information for each coming concert. The information should include the place, date and
time of the concert as well as the type of concert and the repertoire that will be played.
For each musician in the orchestra, the database should store his/her name, the instrument that he/she plays, and in
which of the coming concerts he/she will participate.
Draw an EER diagram for the orchestras database. If you make further assumptions, please state and motivate them.
Answer
8. The EER diagram below describes the database of a training center, including information
about its members, training activities and bookings. Each member is identified through his/her e-mail
address. Gold-members can book any training activity, while common members can only book coreactivities. For each training activity, the database stores the schedule (week, week day, and time), the room,
the leader and the e-mail of the leader. Each leader leads several activities per week, but the same activities
every week.
Translate the EER diagram into a relational model. Mark each primary key with a straight underline, and
each foreign key with a dotted underline. For the foreign keys, mark the attributes that are referred by the
foreign keys by means of arrows.