Documente Academic
Documente Profesional
Documente Cultură
7-1 Arcs
- Constraint = it applies to data modeling
- Diagram an arc constraint to represent an exclusive OR relationship
- Arc vs. subtype
- Arcs in data modeling help designers clarify an exclusive OR across relationships
1. What is a Constraint?
- = restrictions that applies to data, which is often dictated by the business rules
- May refer to a single attribute of an entity, or to relationship between entities
2. Exclusive OR relationship
- = Mutually exclusive relationships between entities known as Exclusive OR
relationship
- = a relationship between one entity and two(or more) other entities where only
one of the relationships can exist at a time
- Exclusive OR = a logical operator that return a true value if one, but not both, of
its operands is true
- Exclusive OR relationship = another term for a mutually exclusive relationship
- In ERD, this type of relationship is modeled with an Arc
- Each TRAINING EVENT must be hosted by one and only one IN HOUSE
TRAINER OR one and only one TRAINING COMPANY ( it cannot be both -: only
one of the relationship can exist at a time)
3. Representing exclusive OR relationship in the ERD
- Arcs are a way to represent mutually exclusive relationships in the ERD
- Arc is represented on an ERD as a solid line with curved ends
- A circle is drawn on the arc for every relationship that is part of the arc
4. Arcs
- An arc always belongs to one entity
- Arcs can include more than two relationships
- Not all relationships of an entity need to be included in an arc
- An entity may have several acrs
- An arc should always consist of relationships of the same optionality
- All relationships in an arc must be mandatory or all must be optionally
- Relationships in an arc may be different cardinality, although this is rare
==
- NOTES: Use supertypes/subtypes when you want to represent classifications or
types of things
7-2 Hierarchies and Recursive Relationships
==
- With UIDs an employee ID or number for each entity
2. Another Relationships Example
- Cascading UIDs (barred relationships)
- Floor UID=FLOOR number + BUIDING id
- SUITE UID=SUITE number + FLOOR number + BUIDING id
- ROOM UID= ROOM id + SUITE number + FLOOR number + BUIDING id
- This is a long UID and hierarchical structure can changes often, in this case
artificial codes may be more practical
4. Drawing Convention
- Knows as “pig’s ear”