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