Assignment 2 Unit 1
Assignment 2 Unit 1
Q2. Consider a MOVIE database in which data is recorded about the movie industry. The
data requirements are summarized as follows:
■ Each movie is identified by title and year of release. Each movie has a length in minutes. Each
has a production company, and each is classified under one or more genres (such as horror,
action, drama, and so forth). Each movie has one or more directors and one or more actors
appear in it. Each movie also has a plot outline. Finally, each movie has zero or more quotable
quotes, each of which is spoken by a particular actor appearing in the movie.
■ Actors are identified by name and date of birth and appear in one or more movies. Each actor
has a role in the movie.
■ Directors are also identified by name and date of birth and direct one or more movies. It is
possible for a director to act in a movie (including one that he or she may also direct).
■ Production companies are identified by name and each has an address. A production company
produces one or more movies.
Design an entity–relationship diagram for the movie database.
Q3. Consider a MAIL_ORDER database in which employees take orders for parts from
customers. The data requirements are summarized as follows:
■ The mail order company has employees, each identified by a unique employee number, first
and last name, and Zip Code.
■ Each customer of the company is identified by a unique customer number, first and last name,
and Zip Code.
■ Each part sold by the company is identified by a unique part number, a part name, price, and
quantity in stock.
■ Each order placed by a customer is taken by an employee and is given a unique order number.
Each order contains specified quantities of one or more parts. Each order has a date of receipt as
well as an expected ship date. The actual ship date is also recorded.
Design an entity–relationship diagram for the mail order database.
Q4. Consider the UNIVERSITY database described in below.
a. During a particular semester and year, only one section can use a particular classroom at a
particular DaysTime value.
b. During a particular semester and year, an instructor can teach only one section at a particular
DaysTime value.
c. During a particular semester and year, the section numbers for sections offered for the same
course must all be different.
Q5. Consider the ER diagram shown in Figure 3.22 for part of a BANK database. Each bank can
have multiple branches, and each branch can have multiple accounts and loans.
a. List the strong (nonweak) entity types in the ER diagram.
b. Is there a weak entity type? If so, give its name, partial key, and identifying relationship.
c. What constraints do the partial key and the identifying relationship of the weak entity type
specify in this diagram?
d. List the names of all relationship types, and specify the (min, max) constraint on each
participation of an entity type in a relationship type. Justify your choices.
Q-5) Find the minimum number of tables required to represent the given ER diagram in
relational model.