Course contentsShow
← Computer Science
Lesson 1612 of 2,87237. Database Design and NormalizationFree lesson

Entities and Entity Sets

Defining entities as distinguishable objects and entity sets as collections of similar entities with shared attributes.

Entities and Entity Sets

What You'll Learn

You'll learn how to identify and group the fundamental objects in a database design using entities and entity sets.

Understanding Entities

An entity is any distinguishable object or "thing" in the real world that we want to store information about in our database. The key word here is distinguishable—each entity must be uniquely identifiable from other entities.

Think of entities like individual people, products, or events. For example:

  • A specific student named "Alice Johnson" with ID 12345
  • A particular book titled "Database Systems" with ISBN 978-0-13-187325-4
  • An order placed on January 15, 2024 at 3:42 PM

Each of these is a concrete, individual instance that exists in the real world or your business domain.

Entity Sets: Collections of Similar Entities

An entity set is a collection of entities that share the same type and attributes. If entities are individual items, entity sets are the categories or types they belong to.

Using our examples above:

  • STUDENT is an entity set containing all student entities (Alice, Bob, Carol, etc.)
  • BOOK is an entity set containing all book entities
  • ORDER is an entity set containing all order entities

All entities within an entity set share the same attributes (properties). For instance, every entity in the STUDENT entity set might have attributes like student_id, name, email, and enrollment_date.

The Analogy

Think of entity sets as cookie cutters and entities as the actual cookies. The cookie cutter (entity set) defines the shape and what characteristics each cookie will have. Each cookie (entity) is a distinct, individual item created from that template.

Key Takeaway: Entities are distinguishable real-world objects; entity sets are collections of similar entities that share the same structure and attributes.