The foundation of an Entity Relationship Diagram (ERD).
Represents the conceptual database from the end-users’ perspective.
ERDs illustrate essential components of a database: entities, attributes, and relationships.
Required Attribute: Must have a value when the instance is added; null not allowed.
Optional Attribute: Can be left empty when the instance is added.
Set of possible values for an attribute, expressed as:
Numeric & date: (minimum, maximum)
Categorical: (value1, value2, …, valueN)
Examples:
Sex (M, F)
QPA (0, 4)
Years of service (0, 30)
Attributes may share the same domain.
Composed of one or more attributes to distinguish instances of an entity.
Mapped to primary keys in tables and underlined in the ERD.
Composite Identifiers: Primary key with more than one attribute.
Composite Attribute: Can be subdivided into several attributes.
Simple Attribute: Cannot be subdivided into new attributes.
Single-valued Attributes: Can have one value only (e.g., social security number, student ID).
Not necessarily a simple attribute.
Multivalued Attributes: Can have multiple values and are indicated with a double line in Chen ERM.
Despite being allowed in conceptual models, do not implement in RDBMS.
Options for resolution:a. Create several new attributes within the original entity for the multivalued attribute.b. Create a new entity for the components of the original multivalued attribute.
Attributes whose values are calculated from other attributes and may not need storage in the database.
Representation: Dashed line connecting the entity and attribute in Chen notation.
Sometimes referred to as computed attributes.
Storage decision depends on processing requirements and application constraints.
Advantages: Saves CPU processing cycles; readily available data values.
Disadvantages: Consumes storage space.
Advantages: Can track historical data.
Disadvantages: Requires constant updates for accuracy; computative complexity may slow queries.
Names are often active or passive verbs that describe interactions between entities.
Cardinality: Represents the minimum and maximum counts of entity occurrences linked to a related entity.
Indicated in ERDs by numbers in the format (x, y).
Database management systems implement cardinalities at the application level, not table level.
Occurs when the primary key of the related entity does not include a primary key component from the parent entity.
Example: COURSE and CLASS entities showing weak relationships.
Occurs when the primary key of the related entity includes a primary key component from the parent entity.
Critical for loading order of tables.
Depend on another entity for existence and typically lack their own identifier.
Often represented with a partial identifier in an E-R diagram.
Exist independently and usually represent primary entities in a model.
An entity occurrence may not require a corresponding occurrence in a relationship (minimum cardinality of 0).
An entity occurrence requires a corresponding occurrence in a relationship (minimum cardinality of 1).
CARDINALITY | COMMENT |
---|---|
O (0,N) | Zero or many; many side is optional. |
K (1,N) | One or many; many side is mandatory. |
어 (0,1) | Zero or one; optional on this side. |
Indicates the number of entities associated with a relationship.
Unary Relationship: Association within one entity (recursive).
Binary Relationship: Two entities associated (most common form).
Ternary Relationship: Association among three entities, often decomposed into binary relationships.
Database design is iterative, not linear or sequential.
Typical steps include:
Creating a detailed narrative of organizational operations.
Identifying business rules from the operational narrative.
Determining main entities and relationships from business rules.
Developing the initial ERD.
Identifying attributes and primary keys that describe entities.
Revising the ERD based on feedback.
Activities are repeated until agreement is reached between end users and designers on the ERD's representation of organizational functions.
Rob, Peter and Coronel, Carlos. Database Systems: Design, Implementation and Management, 7th Edition. Course Technology, Thomson Learning Inc.©2007.