热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

Chapter 3

ER Model, Entities, Relationships, Attributes, and Constraints

Design data conceptually by learning how to identify entities, attributes, relationships, keys, and business constraints before building tables.

Inside this chapter

  1. Why Conceptual Modeling Comes First
  2. Entities and Attributes
  3. Relationships and Cardinality
  4. Keys in Conceptual Design
  5. Constraints and Business Rules
  6. Real-World Example

Series navigation

Study the chapters in order for the clearest path from database fundamentals and SQL to transactions, indexing, recovery, distributed systems, tuning, and advanced DBMS engineering understanding. Use the navigation at the bottom to move smoothly across the full tutorial series.

Tutorial Home

Chapter 3

Why Conceptual Modeling Comes First

Good databases are not designed by jumping directly into SQL tables. They begin with understanding the real-world domain. ER modeling helps students and teams represent business objects and relationships before implementation details are chosen.

Chapter 3

Entities and Attributes

An entity represents a real-world object or concept such as Student, Course, Customer, Order, Doctor, or Invoice. Attributes describe properties of the entity such as name, phone, email, date of birth, or salary.

Student(student_id, name, email, date_of_birth)
Course(course_id, title, credits)
Chapter 3

Relationships and Cardinality

Relationships show how entities are connected. Cardinality describes how many instances of one entity relate to another.

  • One-to-one
  • One-to-many
  • Many-to-many

For example, one department may have many employees, while a student may enroll in many courses and a course may contain many students.

Chapter 3

Keys in Conceptual Design

Candidate keys, primary keys, and partial keys help identify entities uniquely. A well-chosen key simplifies later schema design and reduces ambiguity.

Chapter 3

Constraints and Business Rules

A database is not only a storage mechanism. It is also a place where important rules are enforced. Examples include unique email addresses, valid enrollment rules, no negative account balances in certain contexts, or one seat being booked by one passenger at a time.

Chapter 3

Real-World Example

In an online shopping system, entities may include Customer, Product, Cart, Order, Payment, and Shipment. Relationships show who purchased what, which order contains which items, and how payment and delivery are connected. ER modeling makes this structure understandable before implementation begins.

版权所有 © 2026,WithoutBook。