5 - 1/14/10
 Example: Three Variants for Many-to-One...

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

View Full Document Right Arrow Icon
1/14/10 1 Example: Three Variants for Many-to-One Coarse classifcation oF (binary) relationships: One-to-many, many-to-one Many-to-many One-to-one (Functional) ECS‐165A WQ'10 1 Employee Department worksfor ssn name lot code name 0..* 0..1 (0,*) (0,1) 1 N Relationship Attributes Each instance oF the relationship has a value For the attribute … 2 Employee Department worksfor ssn name lot code name startdate 1..* 0..1 ECS‐165A WQ'10
Background image of page 1

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

View Full DocumentRight Arrow Icon
1/14/10 2 Relationship Attributes Try all three locations for the attribute … Which one makes sense? 3 Employee Department worksfor ssn name lot code name startdate 1..* 0..1 startdate startdate ECS‐165A WQ'10 Relationship Set Attributes Because Employees have zero or one home departments, … start date will work as an Employee or worksfor attribute What about startdate at Department? 4 Employee Department worksfor ssn name lot code name startdate 1..* 0..1 startdate startdate ECS‐165A WQ'10
Background image of page 2
1/14/10 3 Relationship Set Attributes What about now? ... Since employees can have multiple home departments, it must be a relationship attribute 5 Employee Department worksfor ssn name lot code name startdate 1..* 0..* startdate startdate ECS‐165A WQ'10 Relationship Set Role Names 6 Employee Department manager ssn name lot code name 1..1 0..1 managed by manages Relationships can have role names An employee “ manages ” zero or one department A department is “ managed by ” exactly one employee Note: some notations use the opposite side of the relationship set to specify cardinality and roles ECS‐165A WQ'10
Background image of page 3

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

View Full DocumentRight Arrow Icon
1/14/10 4 Relationship Set 7 Employee reports to ssn name lot 0..* 0..1 supervises supervised by Entity sets can participate in different roles for the same relationship set ECS‐165A WQ'10 Weak Entity Sets In this model assume we need to record the insurance policies of employees we need to track dependents w.r.t. the policies we only need to store the name and date-of-birth of dependents (and nothing else) that, e.g., when employees leave, we no longer track their policies or dependents 8 Employee policy ssn name lot Dependent name dob ECS‐165A WQ'10
Background image of page 4
1/14/10 5 Weak Entity Sets
Background image of page 5

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

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

This note was uploaded on 02/06/2010 for the course CSE 302 taught by Professor Joel during the Summer '05 term at Punjab Engineering College.

Page1 / 12

5 - 1/14/10
 Example: Three Variants for Many-to-One...

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

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