You are on page 1of 2

Problem #1

• http://www.imdb.com wants to store information about movies and has chosen you to help them
• Three steps:
– Requirements Analysis: Discover what information needs to be stored, how the stored
information will be used, etc. Taught in course on system analysis and design
– Conceptual Database Design: High level description of data to be stored (ER model)
– Logical Database Design: Translation of ER diagram to a relational database schema
(description of tables)
– Physical Database Design: Done by the DB system
Requirements
• For actors and directors, we want to store their name, a unique identification number, address
and birthday (why not age?)
• For actors, we also want to store a photograph
• For films, we want to store the title, year of production and type (thriller, comedy, etc.)
• We want to know who directed and who acted in each film. Every film has one director. We store
the salary of each actor for each film
• An actor can receive an award for his part in a film. We store information about who got which
award for which film, along with the name of the award and year.
• We also store the name and telephone number of the organization who gave the award. Two
different organizations can give an award with the same name. A single organization does not
give more than one award with a particular name per year.

Problem #2

A university DB contains information about professors (identified by social security number, or SSN) and
courses (identified by courseid). Professors teach courses; each of the following situations concerns the
Teachers relationship set. For each situation, draw an ER diagram that describes it (assuming no further
constraints hold).
– Professors can teach the same course in several semesters, and each ofering must be recorded.
– Professors can teach the same course in several semesters, and only the most recent such
offering needs to be recorded. (Assume this condition applies in all subsequent questions.)
– Every professor must teach some course.
– Every professor teaches exactly one course.
– Every professor teaches exactly one course, and every course must be taught by some
professor.
– Now suppose that certain courses can be taught by a team of professors jointly, but it is possible
that no one professor in a team can teach the course.
– 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 an SSN, a name, an age, and a degree program (M.S. or Ph.D.)
– Each project is managed by one professor (known as the project’s principal investigator).
– Each project is worked on by one or more professors (known as the project’s co-investigators).
– Professors can manage and/or work on multiple projects.
– Each project is worked on by one or more graduate students (the project’s research assistants).
– When grad. students work on a project, a professor must supervise their work on the project.
Grad. Students may work on many projects (in this case they may have more than one
supervisor).
– Departments have a department number, name, and a main office.
– Departments have a professor, 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.
– Grad. students have one major department in which they are working on their degree.
– Each grad. Student has another, more senior grad. student (a student advisor) who advises
him/her on what courses to take.

Problem #3
Design an Entity-Relationship Diagram that models the following objects and relationships in the
world of football (NFL): teams, players, games, managers and contracts. Each (NFL-) team has a
unique team name, and a city it plays in. Each person being part of the NFL-world has a unique
ssn and a name. Additionally, for players their weight, height, position and birth dates are of
importance. Players have a contract with at most one team and receive a salary for their services,
and teams have at least 24 and at most 99 players under contract. Each team has one to three
managers; managers can work for at most 4 teams and receive a salary for each of their
employments. Players cannot be managers. A game involves a home-team and visiting-team;
additionally, the day of the game, and the score of the game are of importance; teams play each
other several times in a season (not on the same day!). Moreover, for each game played we like to
know which players participated in the game and how many minutes they played.

– Indicate the cardinalities for each relationship type; assign roles (role names) to each
relationship if there are ambiguities! Use sub-types, if helpful to express constraints!

You might also like