Chapter 4
Domain
Set of possible values for a given attribute
Optional participation
one entity occurrence does not require a corresponding entity occurrence in a particular relationship
composite identifier
primary key composed of more than one attribute
Relationship Degrees
unary, binary, ternary
Disadvantages of Storing Derived Attributes
- Requires constant maintenance to ensure derived value is current, especially if any values used in the calculation change.
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
Advantages of not storing derived attributes
- Saves storage space - Computation always yields current value
Disadvantages of not storing derived attributes
- Uses CPU processing cycles - Increases data access time - Adds coding complexity to queries
Attribute
Characteristics of entities
Relationship
Association between entities that always operate in both directions
Unary relationship
Association is maintained within a single entity
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
Derived attribute
Attribute whose value is calculated from other attributes. (Derived from algorithm)
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
ERD depicts the
Conceptual database as viewed by end user. Database's main components (entities, attributes, relationships)
Developing an ER Diagram
Create a detailed narrative of the organization's description of operations. ID business rules based on descriptions ID main entities and relationships from business rules Develop initial ERD ID attributes & PK's for entities Revise and review ERD
Connectivity
Describes the relationship classification
Optional attribute
Does not require a value, can be left empty
Participants
Entities that participate in a relationship
Existence independence
Entity exists apart from all of its related entities Referred to as a strong entity or regular entity
Existence dependence
Entity exists in the database only when it is associated with another related entity occurrence
Weak Entity
Existence dependent Has a PK that is partially or totally derived from parent entity in the relationship. For example, a DEPENDENT requires the existence of an EMPLOYEE.
Cardinality
Expresses the minimum and maximum number of entity occurrences associated with one occurrence of related entity
Required attribute
Must have a value, cannot be left empty
Mandatory participation
One entity occurrence requires a corresponding entity occurrence in a particular relationship
Identifiers
One or more attributes that uniquely identify each entity instance.
Relationship types
Participants Connectivity Cardinality
strong (identifying) relationship
Primary key of the related entity contains a primary key component of the parent entity
Weak (non-identifying) relationship
Primary key of the related entity does not contain a primary key component of the parent entity
Recursive relationship
Relationship exists between occurrences of the same entity set
Associative (Composite) Entities
Represents M:N relationship between entities Is a 1:M relationship with the parent entities Has PK attributes of each parent
Attribute terms
Required attribute Optional attribute Domain Identifiers Composite Identifier Composite attribute Simple attribute Single-valued attribute Multivalued attributes Derived attribute
Ternary relationship
Three entities are associated
Binary relationship
Two entities are associated
Relationship Degree
indicates the number of entities or participants associated with a relationship