Exam 1-Chapter 4 Flashcards
The Entity Relationship Model (ERM)
- ERD represents conceptual database as viewed by end user
- ERDs depict database’s main components: entities, attributes, relationship
Entities
Refers to eneity set and not to a single entity occurrence; corresponds to table and not to row in relational environment; in Chen and Crow’s Foot models, entity is represented by rectangle with entity’s name; entity name, a noun, written in capital letters
Attirbutes
Characteristics of entities; Chen notation; attributes represented by ovals connected to entity rectangle with a line (each oval contains the name of attribute it represents; Crow’s Foot notation: attributes written in attribute box below entity rectangle
Required Attribute
Must have a value’ boldfaced in Crow’s Foot notation
Optional Attribute
May be left empty
Domain
Set of possible values for an attribute; attributes may share a domain
Identifiers (Primary Keys)
One or more attributes that uniquely identify each entity instance; boldfaced and underlined in the table structure
Compostie Identifer
Primary key composed fo more than one attribute
Composite Attribute
Can be subdivided
Simple Attribute
Cannot be subdivided
Single-Value Attribute
Can have only a single value
Multivalued Attributes
Can have many values (double lines in the Chen ERM; Not identified in Crow’s Foot)
M:N relationships and multivaled attributes should not be implemented in the RDBMS
Derived (Computed) Attribute
Vale may be calculated from otehr attributes; need not be physically stored within database
Relationships
Association between entities; Participants are entities that participate in a relationship; relationship name is a verb; relationships between entities always operate in both directions
Connectivity
Describes the relationship classification (type)
Cardinality
Expresses minimum and maximum number of entity occurrences associated with one occurrence of related entity
Existence Dependence
entity exists in database only when it is associated with another related entity occurrence
It has a mandatory foreign key attribute that cannot be null
Existence Idependence
Entity can exist apart from one or more related entities
Sometimes such an entity is referred to as a strong or regular entity
Weak (Non-Identifying) Relationship
Exists if the PK of the related entity does not contain a PK component of the parent entity (i.e., the foreign key is not part of the primary key)
Dashed line in Crow’s Foot
Strong (Identifying) Relationship
Exists when the PK of the related entity contains a PK component of the parent entity
Solid line in Crow’s Foot
Weak Entities
Meet two conditions (is existence-dependent=it cannot exist without the entity with which it has a relationship; its primary key is partially or totally derived from parent entity in relationship)
A strong relationship indicates that the related entity is weak
Database designer determines whether an entity is weak based on business rules
Optional Participation (in a relationship)
One entity occurence does not require a corresponding entity occurrence in a particular relationship
Mandatory Participation
One entity occurrence requires corresponding entity occurrence in particular relationship
Unary Relationship
Association is maintained within single entity
Binary Relationship
Two entities are associated
Ternary Relationship
Three entities are associated
Associative (Composite) Entities
Also known as bridge entities
- Used to implement M:N relationships
- Composed of primary keys of each of the entities to be connected
- May also contain additional attributes that play no role in connective process