Data Mgmt Lab_Part_8 - 22 Chapter 3 major INTEGER , PRIMARY...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 22 Chapter 3 major INTEGER , PRIMARY KEY (grad ssn), FOREIGN KEY (major) REFERENCES Depts ) Note that the Major table is not necessary since each Graduate has only one major and so this can be an attribute in the Graduates table. 7. CREATE TABLE Advisor ( senior ssn CHAR(10) , grad ssn CHAR(10) , PRIMARY KEY (senior ssn, grad ssn), FOREIGN KEY (senior ssn) REFERENCES Graduates (grad ssn), FOREIGN KEY (grad ssn) REFERENCES Graduates ) 8. CREATE TABLE Manages ( pid INTEGER , prof ssn CHAR(10) , PRIMARY KEY (pid, prof ssn), FOREIGN KEY (prof ssn) REFERENCES Professors, FOREIGN KEY (pid) REFERENCES Projects ) 9. CREATE TABLE Work In ( pid INTEGER , prof ssn CHAR(10) , PRIMARY KEY (pid, prof ssn), FOREIGN KEY (prof ssn) REFERENCES Professors, FOREIGN KEY (pid) REFERENCES Projects ) Observe that we cannot enforce the participation constraint for Projects in the Work In table without check constraints or assertions in SQL....
View Full Document

This note was uploaded on 01/17/2012 for the course EGN 4302 taught by Professor Dr.vishak during the Fall '12 term at University of Central Florida.

Page1 / 3

Data Mgmt Lab_Part_8 - 22 Chapter 3 major INTEGER , PRIMARY...

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