Sie sind auf Seite 1von 2

Q1. The company you work for wants to digitize their time cards.

You have been asked to


design the database for submitting and approving time cards. Draw the database ER diagram
with the following information:
1. A timecard should have hours worked and date submitted
2. Each timecard is associated with exactly one employee
3. Each timecard should have a unique id
4. Each timecard has a status: it is either approved, not approved, or pending
5. Each employee has a unique id
6. Each employee has a name and address.
7. Each employee submits a time card every pay period. i.e. In 1 year, they will submit
multiple time cards
8. Each employee either has direct deposit or physical check as their method of payment
9. Each employee is associated with exactly one manager
10. Each manager has a unique id and a name
11. Each manager is in charge of multiple employees
12. Each manager approves time cards for multiple employees
Remember to indicate the key for each entity, as well as the multiplicity of each relationship
(e.g. one-to-many) using the appropriate notation.
Q2. Galleries keep information about artists their names (which are unique), birthplaces, age
and style of art. For each piece of artwork, the artist, the year it was made, its unique title, its
type of art (e.g. painting, lithograph, photograph) & its price must be stored pieces of artwork
are also classified into groups of various kinds e.g. portraits, still lifes, works by Picasso or
works of the 19th century; a given piece may belong to more than one group. Each group is
identified by name that describes the group. Finally, galleries keep information about
customers. For each customer galleries keep that persons unique name, address, total amount
of dollars spent in the gallery, the artists and groups of art that the customer tend to like
Draw the Er diagram for the database.

Q3. Consider the following information about a university database:


Professors have an SSN, a name, an age, a rank, and a research specialty.
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.

Das könnte Ihnen auch gefallen