Skip to content
IRC-Coding IRC-Coding
ER Model Entity Relationship Database Cardinality Normalization

ER Model Explained: Entities, Relationships & Cardinality

Learn ER models: entities, attributes, relationships, cardinality, notations, and exam questions with practical examples.

S

schutzgeist

2 min read

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:1
  • 1:n
  • m:n

Example (Simple)

Scenario: Customer and Order

  • Entity Customer (CustomerNo PK, Name, Address)
  • Entity Order (OrderNo PK, 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)

  1. What does an ER Model consist of? Entities, attributes, relationships (including cardinalities).
  2. What does m:n mean and how is it implemented? Many-to-many; via a junction table in the relational model.
  3. What is a weak entity? An entity that cannot exist without reference to another entity (e.g., order line item).
  4. 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.


Keine Bücher für Kategorie "datenbanken" gefunden.

Back to Blog
Share:

Related Posts