Lesson 11
Entities and Attributes - Conclusion
This module showed how business objects become entities and how their characteristics become attributes for an ER model. You learned why every attribute needs a well-defined domain, how to identify and resolve multi-valued attributes to satisfy First Normal Form (1NF), and how constraints (keys, checks, and foreign keys) protect data integrity across the schema.
What you should be able to do now
- Define entities and their attributes.
- Explain the purpose of entity identifiers (primary keys).
- Apply two rules for creating robust identifiers.
- Describe instances of entities (rows) and how they are identified.
- Describe attribute domains and common domain types.
- Recognize the problem with multi-valued attributes (1NF violation).
- Resolve multi-valued attributes by adding targeted attributes (small, fixed sets).
- Resolve multi-valued attributes by creating a new entity (open-ended sets).
- List and use entity/attribute constraints to enforce integrity.
The Single-Value Rule (1NF)
The single-value rule states that each attribute holds
one value per row. Storing lists in a single column breaks 1NF and causes ambiguity, slow searches, and update anomalies.
Incorrect (violates 1NF)
| CustomerID | CustomerName | PhoneNumbers |
| 1001 | John Doe | 555-1234, 555-5678 |
| 1002 | Jane Smith | 555-9999 |
Correct (follows 1NF)
Customers
| CustomerID | CustomerName |
| 1001 | John Doe |
| 1002 | Jane Smith |
CustomerPhones
| PhoneID | CustomerID | PhoneNumber |
| 1 | 1001 | 555-1234 |
| 2 | 1001 | 555-5678 |
| 3 | 1002 | 555-9999 |
- Prevents anomalies: clean inserts/updates/deletes.
- Improves performance: values are indexable and filterable.
- Clarifies meaning: each value has its own row and constraints.
Relational Database Design Implementation
Glossary
- attribute: A property of an entity; implemented as a column.
- base table: A table stored on disk (as opposed to a view).
- BLOB domain type: “Binary large object” used for binary data (e.g., images).
- Boolean expression: A comparison/conditional expression that evaluates to TRUE or FALSE.
- conceptual model: Technology-neutral description of entities, attributes, and relationships.
- data value: The value stored at the intersection of a row and column.
- data integrity: The accuracy, consistency, and validity of stored data.
- domain: The allowed set of values and rules for an attribute (type, range, format, nullability).
- domain constraints: Rules enforcing an attribute’s domain (e.g., CHECK, FK to a code table).
- entity: A business object stored in the database; typically implemented as a table.
- instance of an entity: One occurrence of an entity; a table row.
- key attribute: An attribute (or minimal set) that uniquely identifies an entity instance.
- multi-valued attribute: An attribute attempting to hold more than one value; violates 1NF.
- non-key attribute: An attribute that describes, but does not identify, an entity.
- requirements analysis: The stage where data needs and constraints are gathered.
- single-valued attribute: An attribute that holds exactly one value per entity instance (1NF compliant).
The next module introduces
entity relationships and how to model them correctly in an ER diagram.
Entities and Attributes - Quiz
