100% found this document useful (1 vote)
1K views

Notes - Section 7 - Arcs, Hierarchies, and Recursive Modeling

The document discusses arcs, hierarchies, and recursive modeling in data modeling. It defines arcs as a way to represent exclusive OR (XOR) relationships, where only one of multiple relationships can exist. Arcs are drawn as lines with curved ends connecting two or more relationships of the same entity. Hierarchies involve entities organized into successive levels with relationships, like an organizational chart, while recursive relationships involve an entity relating to itself. The document provides examples of how to model these structures and compares hierarchical vs recursive relationships.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views

Notes - Section 7 - Arcs, Hierarchies, and Recursive Modeling

The document discusses arcs, hierarchies, and recursive modeling in data modeling. It defines arcs as a way to represent exclusive OR (XOR) relationships, where only one of multiple relationships can exist. Arcs are drawn as lines with curved ends connecting two or more relationships of the same entity. Hierarchies involve entities organized into successive levels with relationships, like an organizational chart, while recursive relationships involve an entity relating to itself. The document provides examples of how to model these structures and compares hierarchical vs recursive relationships.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Section 7 - Arcs, Hierarchies, and Recursive Modeling

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

5. Acrs, supertypes, and Subtypes


- Arcs and super/subtypes both model mutual exclusiveness
- Certain situations are best modeled as an arc, others as supertype and subtypes
- Super/subtypes are Mutually exclusive – in other words, each instance of a
supertype is an instance of only one possible subtype.
- Arcs represent a Mutually exclusive relationship.
- CHECKING ACCOUNT and SAVING ACCOUNT are “types” of ACCOUNT

==
- NOTES: Use supertypes/subtypes when you want to represent classifications or
types of things
7-2 Hierarchies and Recursive Relationships

- UIDs in hierarchical model


- Recursive relationship
- Often, roles are organized by hierarchy
- Hierarchical data is very common

1. Relationships in an Organizational Chart

==
- 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

3. Hierarchy vs. Recursive Relationships


Hierarchical structure / recursive relationship

- Hierarchical relationship: A series of relationships that reflect entities organized


into successive levels.
- Recursive relationship: A relationship between an entity and itself.
- The mandatory attributes specific to an entity (bonus plan, car plan, and budget)
become optional in the recursive model.
- A relationship cannot be both hierarchical and recursive at the same time
- Hierarchical relationship are more explicit and are more easier for most people to
understand because they are very similar to an organizational chart.
- Each entity can have its own mandatory attributes and relationships
- Recursive relationship tend to be simpler because you are using only one entity
- Recursive relationship are less specific- you cannot have mandatory attributes or
relationships unless they are mandatory in all instances of the entity
- Often the structure changes, then a recursive relationship is easier to maintain

4. Drawing Convention
- Knows as “pig’s ear”

5. Automobile Manufacturing Business Scenario

You might also like