lec05.366

lec05.366 - E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6...

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

View Full Document Right Arrow Icon
. . Winter 2008 CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar . . From E-R Models to Relational Databases Examples Converting Relationship Sets Many-to-Many Relationship Sets E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6 Relational Schema: E(A1 , A2, A3, A4) F(B1 , B2 , B3, B4, B5, B6) R(EA1 ,FB1 , FB2 , C1, C2 Notes: C1 and C2 can participate in the primary key of F (either jointly, or separately). R.EA1 is a foreign key referencing E . R.FB1,R.FB2 is a foreign key referencing F . 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Many-to-One Relationship Sets E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6 Relational Schema: E(A1 , A2, A3, A4, FB1, FB2, C1, C2) F(B1 , B2 , B3, B4, B5, B6) Notes: E.FB1,E.FB2 is a foreign key referencing F . One-to-One Relationship Sets E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6 Relational Schema 1: E(A1 , A2, A3, A4, FB1, FB2, C1, C2) F(B1 , B2 , B3, B4, B5, B6) Notes: E.FB1,E.FB2 is a foreign key referencing F . Relational Schema 2: E(A1 , A2, A3, A4) F(B1 , B2 , B3, B4, B5, B6, C1, C1, EA1) Notes: F.EA1 is a foreign key referencing E . 2
Background image of page 2
Weak Entity Sets
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6 Relational Schema: E(A1 , A2, A3, A4, FB1 , FB2 , C1, C2) F(B1 , B2 , B3, B4, B5, B6) Notes: • E.FB1,E.FB2 is a foreign key referencing F . Aggregation E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6 G S D1 D2 D3 Relational Schema: E(A1 , A2, A3, A4) F(B1 , B2 , B3, B4, B5, B6) R(EA1 ,FB1 , FB2 , C1, C2 G(D1 , D2) S(GD1 , D3, REA1 , RFB1 , RFB2 ) Notes: • C1 and C2 can participate in the primary key of F (either jointly, or separately). If this is the case, they must be included in the attribute list for S . • R.EA1 is a foreign key referencing E . • R.FB1,R.FB2 is a foreign key referencing F . • S.GD1 is a foreign key referencing G . • S.REA1, S.RFB1, S.RFB2 is a foreign key referencing R . S.REA1 is a foreign key referencing E . S.RFB1, S.RFB2 is a foreign key referencing F . 3...
View Full Document

This note was uploaded on 05/19/2008 for the course CSC 365 taught by Professor Dekhtyar during the Spring '08 term at Cal Poly.

Page1 / 3

lec05.366 - E F R A3 C1 C2 B1 B5 A1 A2 A4 B2 B4 B3 B6...

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

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