csc4402_2011_home2 - Copy

csc4402_2011_home2 - Copy - CSC4402 Homework 2 I. Due...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC4402 Homework 2 Due Monday September 19, 2011 I. Following is the logical schema for the Professor-Student database, describing professors, students, and the relationship "serving-on-the committee" between the professors and students. The primary keyfields are underlined : Prof: ( Pnum Pname City Dept) for Professors St: ( Snum Sname City Dept Degree Major_Pnum) for Students Com: ( Snum Pnum Hours) for committees In the above database, the data type for the Hours attribute in table Com is SMALLINT ,and all other attributes have data type VARCHAR(20). Note that the attribute "Major_Pnum" denotes the Pnum for the student’smajor professor and thus it is a foreign key intable St. Assume that every professor serves on one or more committees and every student has a committee of one or more professors. The student’smajor professor must be in his/her committee. Write CREATE TABLE statements to create the database for the above scheme (pay attention to the primary key and foreign key clauses).
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/02/2011 for the course CS cs4402 taught by Professor Jianhua during the Fall '11 term at LSU.

Ask a homework question - tutors are online