ERD Flashcards
What are a database’s main components?
Entities
Attributes
Relationships
Attributes:
Characteristics of entities
Required attribute:
Must have a value, cannot be left empty
Optional attribute:
Does not require a value, can be left empty
Domain:
Set of possible values for a given attribute
Identifiers:
One or more attributes that uniquely identify each entity instance
Composite identifier:
Primary key composed of more than one attribute
Composite attribute:
Attribute that can be subdivided to yield additional attributes
Simple attribute:
Attribute that cannot be subdivided
Single-valued attribute:
Attribute that has only a single value
Multivalued attributes:
Attributes that have many values and require creating:
Several new attributes, one for each component of the original multivalued attribute
A new entity composed of the original multivalued attribute’s components
Derived attribute:
Attribute whose value is calculated from other attributes
- Derived using an algorithm
Advantages of storing derived attributes:
Saves CPU processing cycles Saves data access time Data value is readily available Can be used to keep track of historical data Saves storage space Computation always yields current value
Disadvantages of storing derived attributes:
Requires constant maintenance to ensure derived value is current, especially if any values used in the calculation change
Uses CPU processing cycles
Increases data access time
Adds coding complexity to queries
Relationships:
Association between entities that always operate in both directions
Participants:
Entities that participate in a relationship
Connectivity:
Describes the relationship classification
Cardinality:
Expresses the minimum and maximum number of entity occurrences associated with one occurrence of related entity
Existence dependence:
Entity exists in the database only when it is associated with another related entity occurence
Existence independence:
Entity exists apart from all of its related entities
Referred to as a strong entity or regular entity
Weak (non-identifying) relationship:
Primary key of the related entity does not contain a primary key component of the parent entity
Strong (identifying) relationships:
Primary key of the related entity contains a primary key component of the parent entity
Weak Entity:
Conditions:
- Existence-dependent
- Has a primary key that is partially or totally derived from parent entity in the relationship
Database designer determines whether an entity is weak based on business rules
Optional participation:
One entity occurrence does not require a corresponding entity occurrence in a particular relationship
Mandatory participation
One entity occurrence requires a corresponding entity occurrence in a particular relationship
Relationship Degree:
Indicates the number of entities or participants associated with a relationship
Unary relationship:
Association is maintained within a single entity
Recursive relationship:
Relationship exists between occurrences of the same entity set
Binary relationship:
Two entities are associated
Ternary relationship:
Three entities are associated
Associative (Composite) Entities:
- Used to represent an M:N relationship between two or more entities
- Is in a 1:M relationship with the parent entities
- Composed of the primary key attributes of each parent entity
- May also contain additional attributes that play no role in connective process