chapter 7 Flashcards
what is the purpose of arcs in data modelling
- -> helps designers clarify an exclusive or across relationships
- -> it is used to more explicitly define the client’s requirements so that the final implementation will be more accurate
what is a constraint
- -> every business has restrictions on which attribute values and which relationships are allowed
- -> These restrictions are called constraints
- -> They may refer to single attribute of an entity or to relationships between entities
what are mutually exclusive relationships also called
exclusive or relationships
what is an exclusive or relationship
it is a relationship between 1 entity and 2 (or more) other entities where only one of the relationships can exist at a time
this type of relationship is modelled with an arc
what does each feature of an exclusive or diagram tell
each feature will have its own characteristics or attributes
what does the ARC tell the reader
the arc tells the reader that only one of the features of the main entity will have a relationship with each instance of the main entity
how is an arc represented on erd
an 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
what are the rules that an arc needs to follow
- -> an arc always belongs to one entity
- -> arcs can include more than 2 relationships
- -> not all relationships of an entity need to be included in an arc
- -> an entity may have several arcs
- -> an arc should always consist of relationships of the same optionality
- -> all relationships in an arc must be mandatory or all must be optional
- -> relationships in an arc may be of different cardinality although this is rare
what is another way to model mutual exclusiveness
supertypes and subtypes
when to use subtypes/supertypes and when to use arcs
when the features have broadly similar attributes they should be classified as subtypes/supertypes
The features should also be a type of the main entity for example the features of private homes and public spaces are types of the main entity Venue
why are barred relationships used in hierarchical structures
- -> it is used because of cascading UIDs
- -> the uid of the bottom entity is a combination of its own UID and the UID of the entity above it.
- -> for example the UID of floor is a combination of the floor number and the building id
how can heirarchy be modelled in erd
through recursive relationships and hierarchical relationships
a relationship cannot be both _______ and _______ at the same time
hierarchical and recursive at the same time
what are the characterisitics of heirarchical chart
–> hierarchical structures are more explicit and 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, if the business requires this (instead of all optional attributes and relationships, as you would have in a recursive)
–> in this way, your data model truly reflects the business rules
characterisitics of recursive relationships
- -> recursive relationships tend to be simpler because you are using only one entity
- -> your diagram will be less “busy”
- -> they are less specific - you cannot have mandatory attributes or relationships unless they are mandatory in all instances of an entity