Docsity

Drawing for Database Concepts - Homework 1 Assignment | CS 450, Assignments of Computer Applications

Toggle sidebar
bg1
CS 450 Homework #1
Due: Feb 22nd. Hand in hardcopies in class, which must be a computer printout. Hand
drawings are not accepted.
Draw an EER diagram for the MOVIES database described below. Use the standard
notations introduced in the textbook and class handouts. In addition to entity types,
relationships, and their attributes, you must also show all types of constraints that are
indicated/implied in the “Facts” section.
Notice that the name after the bullet is the official attribute name. The information in
parentheses (if provided) is for explanatory purposes. For instance, you must use the
attribute name R_year when drawing the FILM entity type. The information in the
following parentheses (“release year” in the case of R_year) gives an explanation to its
meaning. It should not show up in your diagram.
Entities
A FILM entity has the following attributes
• Title
• R_year (release year)
• Genre, multi-valued
• Prod_cost (production cost)
• Company
• IMDB_tt (serial number assigned by imdb.com), the key
A PERSON entity has the following attributes
• Name, composite, including the following sub-attributes
o Fname (first name)
o Minit (middle initial)
o Lname (last name)
• Sex
• B_year (birth year)
• D_year (death year)
A PERSON still alive will have the NULL value here. This however
cannot be reflected in ER diagrams.
• Age, derived
• Nationality
• Birth_place, composite, including the following sub-attributes
o Nation
o SorP (State or Province)
o Town
• IMDB_nm (serial number assigned by imdb.com), the key
pf2

Partial preview of the text

Download Drawing for Database Concepts - Homework 1 Assignment | CS 450 and more Assignments Computer Applications in PDF only on Docsity!

CS 450 Homework

Due: Feb 22nd. Hand in hardcopies in class, which must be a computer printout. Hand drawings are not accepted.

Draw an EER diagram for the MOVIES database described below. Use the standard notations introduced in the textbook and class handouts. In addition to entity types, relationships, and their attributes, you must also show all types of constraints that are indicated/implied in the “Facts” section.

Notice that the name after the bullet is the official attribute name. The information in parentheses (if provided) is for explanatory purposes. For instance, you must use the attribute name R_year when drawing the FILM entity type. The information in the following parentheses (“release year” in the case of R_year) gives an explanation to its meaning. It should not show up in your diagram.

Entities

A FILM entity has the following attributes

  • Title
  • R_year (release year)
  • Genre, multi-valued
  • Prod_cost (production cost)
  • Company
  • IMDB_tt (serial number assigned by imdb.com), the key

A PERSON entity has the following attributes

  • Name, composite, including the following sub-attributes o Fname (first name) o Minit (middle initial) o Lname (last name)
  • Sex
  • B_year (birth year)
  • D_year (death year) A PERSON still alive will have the NULL value here. This however cannot be reflected in ER diagrams.
  • Age, derived
  • Nationality
  • Birth_place, composite, including the following sub-attributes o Nation o SorP (State or Province) o Town
  • IMDB_nm (serial number assigned by imdb.com), the key

Specializations

  • A PERSON can be an ADULT or MINOR based on age (18 years or older).
  • A MINOR has an additional multi-valued attribute guardian.

Relationships

  • A PERSON PLAYS_IN a FILM as char_name (character name).
  • An ADULT INVOLVES_IN a FILM with the attribute function, such as “director”, “producer” and “screenwriter”.
  • An ADULT MARRIES another ADULT, with the following attributes o W_year (wedding year) o D_year (divorce year) If the couple lives happily hereafter, the D_year will have the value NULL. This however cannot be reflected in your ER diagram.

Facts

  • A FILM can have zero or more actors
  • A FILM must be directed by one or more director
  • A FILM must be produced by one or more producers
  • A PERSON is either an ADULT or MINOR.
  • Not all ADULTs marry.
  • An ADULT can have more than one marriage.