CS 3630 Database Design and Implementation 21 slides MUST go over A2 for Quiz1 next class
Structural Constraints Participation Total (Mandatory) Partial (Optional) Cardinality Max number of occurrences that can be related to one occurrence Staff Oversees PropertyForRent Business Rules
Structural Constraints: Multiplicity Combination of Participation and Cardinality Multiplicity of Binary Relationship one-to-one one-to-many many-to-many
Multiplicity: one-to-one Staff (1..1) Manages (0..1) Branch Each branch has exactly one manager. Each staff manages zero or one branch. Staff staffNo Manages Branch branchNo 1..1 0..1 For one object on the other side!
Multiplicity: one-to-many Staff (0..1) Oversees (0..*) PropertyForRent Staff staffNo Oversees PropertyForRent propertyNo 0..1 0..* One property is overseen by 0 or 1 staff One staff oversees 0 or more properties For one object on the other side!
Specifying Multiplicity Range Staff (0..1) Oversees (0..30) PropertyForRent Staff staffNo Oversees PropertyForRent propertyNo 0..1 0..30 One property is overseen by 0 or 1 staff One staff oversees At most 30 properties
Multiplicity: many-to-many NewsPaper (0..*) Advertises (1..*) PropertyForRent Advertises NewsPaper newspaperName PropertyForRent propertyNo 0..* 1..* One newspaper has Ads for 1 or more properties One property is advertised on zero or more newspapers For one object on the other side!
Structural Constraints: Multiplicity Multiplicity of Complex Relationship (n-ary) When (n-1) values are fixed for other entities
Multiplicity for Complex Relationship Client (0..*) Registers with Staff (0..1) at Branch (0..1) Registers Branch Staff 0..1 0..1 0..* Client
Multiplicity: Summary Symbols Meaning 0..1 Zero or one 1..1 Exactly one 1 Exactly one 0..* Zero or more 1..* One or More 5..10 Between 5 and 10, inclusive 0, 3, 6-8 Zero, three, six, seven, or eight Total: low limit > 0 Partial: low limit = 0
Sample E-R Model
Open everything, but do it yourself! Quiz1 Wednesday, Feb 14, Lab 206 Using Computers Open everything, but do it yourself! Download Word Document from D2L Type your answers. Upload Completed Document to D2L
Assignment3