week13 - Chapter 3 - E-R MODEL (continued) 3.5.3...

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

View Full Document Right Arrow Icon
Chapter 3 - E-R MODEL (continued) 3.5.3 Translating Relationship Sets with Key Constraints Manager (SSN, did , since) Manager (did , SSN, since) One manager - Many departments SQL: CREATE TABLE Manager ( ssn CHAR (11), did INTEGER, since DATE, PRIMARY KEY (did), FOREIGN KEY (ssn) REFERENCES Employees, FOREIGN KEY (did) REFERENCES Departments) 3.5.4 Translating Relationship Sets with Participation Constraints
Background image of page 1

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

View Full DocumentRight Arrow Icon
Every department is required to have a manager due to the participation constraint and at most one manager due to the key constraint. SQL: CREATE TABLE Dept_Manager ( did INTEGER, dname CHAR(20), budget REAL, ssn CHAR(11) NOT NULL, since DATE, PRIMARY KEY (did),
Background image of page 2
FOREIGN KEY (ssn) REFERENCES Employees ON DELETE NO ACTION ) 3.5.5 Translating Weak Entity Sets Weak Entity is dependant on the other entity. A weak entity always participates in a one-to-many binary relationship and has a key constraint and total participation.
Background image of page 3

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

View Full DocumentRight Arrow Icon
SQL: CREATE TABLE Dept_Policy ( dname CHAR(20), age INTEGER,
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

week13 - Chapter 3 - E-R MODEL (continued) 3.5.3...

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

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