E-R Exercise - PowerPoint PPT Presentation

1 / 2
About This Presentation
Title:

E-R Exercise

Description:

Title: Slide 1 Author: eben Last modified by: eben Created Date: 10/1/2003 10:21:02 PM Document presentation format: Letter Paper (8.5x11 in) Company – PowerPoint PPT presentation

Number of Views:10
Avg rating:3.0/5.0
Slides: 3
Provided by: ebe63
Category:
Tags: diagram | exercise

less

Transcript and Presenter's Notes

Title: E-R Exercise


1
  • E-R Exercise
  • A Company database needs to store information
    about
  • employees (identified by ssn, with salary and
    phone as attributes),
  • departments (identified by dno with dname and
    budget as attributes),
  • children of employees (with name and age as
    attributes).
  • Employees work in departments, every department
    is managed by a single employee, a child must be
    identified uniquely by its name when the parent
    (who is an employee, assume that only one parent
    works for the company) is known. We are not
    interested in information about a child if the
    parent leaves the company (and is removed from
    the database).
  • Draw an ER diagram that captures this information.

2
Given the following ER diagram describing a
record companys database, how would you convert
it to relational schemas? Describe what tables
you would create, and what fields they would
have. You can write in English, you dont have
to use SQL DDL.
As discussed in class, the following entities
become relations Instrument, Musician, Song,
Album, Place For relationships, Plays is
many-to-many, it becomes a relation. The same is
true for the Perform and Lives relationships. Ever
y song must appear on only one Album, so the
Songs relation will just have a non-null foreign
key to Album. Similarly, every Album is produced
by only one musician, so the Album relation will
have a non-null foreign key to Musician. Phone is
more complicated. I would probably just have a
table with address and phone, to indicate all the
phones for each address.
Write a Comment
User Comments (0)
About PowerShow.com