Computer Science 186 - Fall 2000 - Franklin - Midterm 1

Computer Science 186 - Fall 2000 - Franklin - Midterm 1 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
file:///C:/Documents%20and%20Settings/Jason%20Raftery/Desktop/R. .. 1 of 4 5/12/2006 8:23 PM CS 186 Midterm October 18, 2000 Question 1 [3 parts, 20 points total]: Data Models a) (10 points) Draw a (simple) E-R diagram that results in a primary key/foreign key constraint to be created between tables. Show the SQL statements that create the tables including the foreign key and primary key indications. b) (5 points) For the relational tables you generated in question 1(a), Describe which insert and delete operations in this database must be checked to ensure that referential integrity is not violated for that foreign key. Please state specifically which operations on which relations can cause problems. c) (5 points) Consider a database of employees in which we need to record information about employees' addresses. Name one condition which would cause you to make "address" an entity set of its own rather than an attribute of the employee entity set. Question 2 [3 parts, 15 points total]: Pure Relational Languages Consider the following schema for an airline database (primary key attributes are in bold ): FLIGHTS ( flight_num , source_city, destination_city) DEPARTURES ( flight_num, date , plane_type) PASSENGERS ( passenger_id , passenger_name, passenger_address) BOOKINGS ( passenger_id, flight_num, date
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Computer Science 186 - Fall 2000 - Franklin - Midterm 1 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online