Entity-Relationship (ER) Diagrams =================================== Close up on participation constraints: -------------------------------------- Ternary relationship: AdvisedBy(StudentRIN, MajorCode, FacultyRIN) Key: StudentRIN, MajorCode Students Major -> Faculty Binary Model: R1(StudentRIN, MajorCode) R2(StudentRIN, FacultyRIN) R3(FacultyRIN, MajorCode) Decomposition! S F M s f1 m s f m2 s3 f m Cannot apply s m -> f Lossy decomposition: representing ternary relationship in three binary relationship does not give me the same exact result! ---------------- Alternate model: Ternary relationship: AdvisedBy(StudentRIN, MajorCode, FacultyRIN) Keys: StudentRIN MajorCode, StudentRIN FacultyRIN Students Major -> Faculty Faculty -> Major Binary Model: R1(StudentRIN, MajorCode) R2(StudentRIN, FacultyRIN) R3(FacultyRIN, MajorCode) Decomposition! S F M s f1 m s f m2 s3 f m f -> m S F M s f m <-- lossless decomposition s f m2 s3 f m