Database Management System (DBMS) / ER Model

What is Entity?

🎯 What is Entity?

An Entity is any real-world object, concept, or thing that is uniquely identifiable and about which data can be stored in a database.

Entity: An Entity is a β€œthing” or β€œobject” in the real world that is distinguishable from all other objects

  • It has physical existence. (e.g: Each student in a college is an entity)

  • Entity can be uniquely identified. (By a primary attribute, aka Primary Key)


🎯 Example Entities:

In a university database:

  • πŸ§‘β€πŸŽ“ Student

  • πŸ“š Course

  • πŸ‘¨β€πŸ« Teacher

Each of these is something the database needs to track and store information about.



🧩 Entity vs Attribute

🧱 Term

πŸ’‘ Meaning

πŸ“ Example

Entity

The object or thing being stored

Student

Attribute

Property/characteristic of the entity

Name, Roll_No, Course


🧬 Types of Entities

πŸ”Ή Strong Entity

  • Exists independently

  • Has its own primary key

  • πŸ“Œ Example: Student(ID, Name, Age)

πŸ”Έ Weak Entity

  • Cannot exist without a related strong entity

  • Lacks a primary key on its own

  • Relies on a foreign key for identification

  • πŸ“Œ Example: Deparment(Dept_Name, Semester, Student_ID)

    (Here, Student_ID is a foreign key from the Student entity)



🧠 Summary Table

πŸ”€ Concept

πŸ“– Description

Entity

Real-world object to store data about

Attribute

Describes a property of an entity

Entity Set

Collection of entities of the same type

Strong Entity

Independent, has a primary key

Weak Entity

Depends on another entity, no independent key