ER Model
This article is a definition of terms for the ER Model (Entity-Relationship Model) – including typical exam questions, key points, and tags for quick review.
What is an ER Model?
The ER Model is a conceptual data model that describes data structures through:
- Entities (objects of the real world)
- Attributes (properties)
- Relationships (connections)
It is often drawn as a diagram (e.g., Chen notation or crow’s foot notation) and serves as the foundation for later deriving a relational database schema (tables, keys, foreign keys).
Core Concepts: Entity, Attribute, Relationship
Entities
Entities are business “things” such as Customer, Order, Article.
Attributes
Attributes describe entities, e.g., CustomerNumber, Name, Address.
Relationships and Cardinalities
Relationships connect entities. Cardinalities specify how many elements relate to each other:
1:11:nm:n
Example (Simple)
Scenario: Customer and Order
- Entity Customer (
CustomerNoPK,Name,Address) - Entity Order (
OrderNoPK,Date,Total) - Relationship: Customer places Order
Interpretation: A customer can place multiple orders; each order belongs to exactly one customer (1:n).
Implementation in the Relational Model (Exam Classic)
1:n: Foreign key typically resides on the n-side (e.g.,Order.customerno).m:n: is implemented in the relational model via a junction table (e.g.,order_position(orderno, articleno, quantity, ...)).
Advantages and Disadvantages
Advantages
- Clear visualization and common language between business and IT
- Good basis for clean database design
- Helps avoid redundancies and inconsistencies
Disadvantages
- Large models quickly become complex
- Notations can vary
- Implementation details (indexes, constraints in detail) are not fully captured
Typical Exam Questions (with Brief Answer)
- What does an ER Model consist of? Entities, attributes, relationships (including cardinalities).
- What does
m:nmean and how is it implemented? Many-to-many; via a junction table in the relational model. - What is a weak entity? An entity that cannot exist without reference to another entity (e.g., order line item).
- Why is the ER Model exam-relevant? It shows the path from business requirements to database structure.
Conclusion
If you master the ER Model securely (cardinalities + transformation), you have an important building block for database tasks in training, projects, and exams.
Recommended Literature: Databases
Keine Bücher für Kategorie "datenbanken" gefunden.