EECS-3421
Introduction to Database Systems

York University
Fall 2018
Project 1: Database design
 
  Assignment

This assignment has two steps. In step one, you will develop an entity-relationship diagram (ERD) for the attached specifications in English. In step two, you will create an entity-relationship diagram from the relational tables I provide. For both steps clearly identify the entity sets, relationship sets, multiplicity (i.e., many-one, many-many, etc.), attributes, keys, and constraints in your model, using the notations and diagramming rules as described in the textbook and in class.

The textbook — and our examples in the lectures — uses the “Stanford” style of E/R modelling. There are many, many “dialects” of E-R. However, for consistency, stay with the textbook's dialect.

Warning: A different textbook was used previously in this course which used a different dialect (the “Wisconsin” dialect) of E/R. There is lots of “3421” materials around with E/R examples written in the Wisconsin dialect. Feel free to use these for studying and for reference, but be aware of the differences. And do your work in the Stanford dialect.

Keep in mind that the case is designed to simulate a real life system-analysis situation; hence, the conversations are unstructured, and sometimes fuzzy. It is your responsibility — as an analyst / designer — to translate what you heard / read into an ERD.

 
  Requirements
Part I: ZOO

The Zoo has many types of animals. Every type has a unique name. Every animal of the same type has a unique animal ID. Animals in two types may have the same animal ID. Animals also have age and gender. Animals may have diseases. The beginning time and the duration of a disease need to be recorded. A disease has a unique name. A type keeper takes care of only one type of animals. Every type may have many type keepers. A type keeper may or may not be familiar with diseases. But every disease must be handled by at least one type keeper. Type keepers have name, employee ID, ssn, address and phone number. Every animal is in a cage. Some cages may be empty. Every cage has a cage ID, space and height. A cage keeper may take care of many cages. Every non-empty cage must have at least one cage keeper. Empty cages don’t need any cage keepers. Cage keepers have name, employee ID, ssn, address and phone number.

  • Create an ER diagram for these specifications (6 points)
  • Which of the specifications stated above cannot be represented in the diagram? Quote exactly from the text above without adding any additional comments (2 points)

Part II: Movies

Consider the following relational schema (primary keys are undelined):


Person(p#,name,birthdate,nationality,gender)

Actor(p#,aguild#)
	FK (p#) refs Person

Director(p#,dguild#)
	FK (p#) refs Person

Writer(p#, wguild#)
	FK (p#) refs Person

Studio(name)

ScreenPlay(title,year)

Authored(title,year,writer)
	FK (title, year) refs ScreenPlay
	FK (writer) refs Writer (p#)

Movie(title,studio,year,genre,director,length)
	FK (studio) refs Studio (name)
	FK (title, year) refs ScreenPlay
	FK (director) refs Director (p#)

Cast(title,studio,year,role,actor,minutes)
	FK (title, studio, year) refs Movie
	FK (actor) refs Actor (p#)

Affiliated(director,studio)
	FK (director) refs Director (p#)
	FK (studio) refs Studio (name)

  • Convert this schema back to the ER diagram (8 points)
  • Assume that there is an FD: name,birthdate,gender -> nationality in Person relation. Answer the following questions:
    • Is Person in BCNF? If not, show the relations after the decomposition of Person into BCNF (2 points)
    • Is Person in 3NF? If not, show the relations after the decomposition of Person into 3NF (2 points)

Considerations

Keep these things in mind for your design.

  1. In real life, many more data elements than described in the “requirements” above would be needed to build a useful quest database. We do not, however, want to turn this project into something huge. So keep in mind that this is a highly simplified case.

  2. As a general approach, if a particular constraint is not explicitly given, then assume the least restricted situation. For example, “many” in ERD is less restricted than “at most one”. However, you must include constraints which are reasonable in real world (e.g. a student has only one advisor).

  3. You are not required to specify the domains of the attributes in this project.

  4. You can use any type of an arrow for this project.

  5. Make certain that you clearly indicate any constraints in your design in addition to those captured in the logic of your E/R diagram.

    State any constraints that are indicated by the requirements but that you know are not enforced by your design in brief documentation attached with your design. Explain whether the unenforced constraints are beyond the scope of E/R, they seem to be beyond the scope (but you do not know for certain), they would greatly complicate the design beyond value, or that you simply do not accommodate them.

 
  Deliverables

Due:

  • Part 1: September 27 at 10 PM
  • Part 2: October 16 at 10 PM

Hand in a hardcopy of your project.

Your project must be typeset. Have a cover page for submitting your work, filling out your student number, etc., something as follows.

Student Number
Sur (Family) Name  
Given Name  

Drop off for the hardcopy of your assignment at the EECS-3421 drop-off box in the Lassonde Building (adjacent to Lassonde #1012).

 
  Resources
Diagramming Software

There are a number of professional tools companies use for E/R, but many are rather expensive and specialized. They often provide lots of additional functionality, such as verifiers and automated tools to help translate to relational.

Many generic drawing packages that include diagram / semantic support work nicely, however. Some suitable applications good for drawing E/R are

Visio and OmniGraffle are great, but somewhat expensive proprietary drawing and generic diagramming applications. Dia is not bad free and open source software under the GNU General Public License version 2.0 (GPLv2), which I used to use. I recommend LibreOffice, which is excellent free and open source software under the Mozilla Public License (MPLv2.0). It is what I am using for the E/R in the class slides. This is on PRISM machines, is in the OS image that EECS distributes, and is freely downloadable.

There are any number of other drawing applications that would work. There are also many quite expensive professional packages on the market for E/R.

Some of the diagramming packages may be missing one or two things kind of needed for E/R. For example, there seems to no easy way to underline text in Dia, but key attributes should be underlined. In this case, you could use bold for key attributes (and partial key attributes in week entities) instead. Just make note in your E/R design document any such notational changes you make due to drawing-application limitations. Pick some reasonable, obvious convention for your arrowheads, following the textbook's style, or the class's lecture style, or something obvious and similar.