Week 3 Flashcards
What is Multiplicity?
Number of possible occurences of an entity type that may relate to a single occurrence of an associated entity type through a particular relationship
What are examples of Binary Relationships?
One-to-One (1:1)
One-to-Many (1:*)
Many-to-Many (:)
What does 0..1 mean?
0 or 1 entity occurence
What does 1..1 (or just 1) mean?
Exactly 1 entity occurence
What does 0..* (or just *) mean?
Zero or many entity occurences
What does 1..* mean?
One or many entity occurences
What does 3..7 mean?
Minimum of 3 up to maximumm of 7 entity occurences
What does 1, 5, 10-12 mean?
1 or 5 or 10 to 12 entity occurences
What is Cardinality?
Maximum values for the multiplicitiy ranges on either side of the relationship
One-to-One (1:1)
One-to-Many (1:*)
Many-to-Many (:)
What is Participation?
Minimum values for the multiplicity ranges on either side of the relationship
Optional participationn (if 0)
Mandatory participation (if 1 or more)
eg. participation of 1..* is mandatory as 1 is the minimum
What is a Fan Trap?
May exist where two or more 1:* relationships fan out from the same entity
A fan trap in databases happens when one item is connected to multiple related items, making it confusing to aggregate data correctly
Fixed by changing structure of the database
What is a Chasm Trap?
A chasm trap in databases occurs when there’s a gap in relationships between entities, making it hard to connect data correctly
Fixed by changing the structure of the database
What is the difference between a Fan Trap and a Chasm Trap?
Fan Traps: Path between certain entity occurences is ambiguous
Chasm Traps: Pathway does not exist between certain entity occurences - pathway connection missing
Steps for Conceptual Database Design
- Identify entity types
- Identify relationship types
- Identify and associate attributes with entity and relationship types
- Determine primary keys for entity types
- Identify Multiplicity constraints
- Consider use of enhanced modeling (optional)
- Check model for redundancy traps
- Validate conceptual model against user transactions
- Review conceptual data model with user
What is an example of a One-To-One (1:1) Relationship?
Staff ID ————–> name
1..1 manages 0..1
Exactly one professor is needed to manage a discipline
Professor could manage at most 1 discipline. Not all professors do management therefore 0..1