A5Ans

# A5Ans - -1 University of Waterloo School of Computer...

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

- 1 – University of Waterloo School of Computer Science CS348 Spring 2009 Assignment 5 Due: July 7, 2009 1. Consider the following relational schema. Student (Snum , Sname) Course( Cnum, Cname ) Prerequisite (Cnum, Prereq ) Professor (Enum, Ename, Dept, Office) Enrollment (Snum, Cnum, Term , Section, Mark) Schedule (Cnum, Term, Section, Days, Time, Room) Class (Cnum, Term, Section , Instructor) The relation Professor stores information on professors. Enum is the employee number. Ename and Office are the name of a professor and his/her office, respectively. Dept indicates the department with which a professor is affiliated. Prerequisite stores the information on prerequisites of a course. All other relations should be self-explanatory. For each relation scheme, the underlined attributes form the primary key. The attribute Snum (and Cnum) in the Enrollment relation is a foreign key referencing the relation Student (and Course, respectively). Each of the attributes Cnum and Prereq in the Prerequisite relation is a foreign key referencing the relation Course. The attribute Cnum (and Instructor) in the Class relation is a foreign key referencing the relation Course (and Professor, respectively). The attributes Cnum, Term and Section in the Enrollment and Schedule relations is a foreign key referencing the Class relation. You may assume the domain of Days is {M, T, W, R, F}. The domain of Term consists of strings of length 3, where the first character representing the term while the last two digits indicating the year. The domain of Mark is the set of integers from 1 to 100. The domain of Section is a single integer from 1 to 9. The domains of Snum, Enum and Instructor are integers. The domain of Time is Date/Time. The domains of other attributes are character strings.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/23/2009 for the course CS 348 taught by Professor Woody during the Spring '09 term at Waterloo.

### Page1 / 4

A5Ans - -1 University of Waterloo School of Computer...

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

View Full Document
Ask a homework question - tutors are online