- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
Entity-Relationship Diagram views real world as entities. It was introduced in 1976 by P.P.Chen and is known as ER Diagram, E R Model, etc. ER Diagram displays the relationships of entity sets.
Let us first see what it consists of −
Entity in DBMS can be a real-world object with an existence, For example, in a School database, the entities can be Teachers, Students, Courses, etc.
Entities has attributes, which can be considered as properties describing it, for example, for Teachers entity, the attributes are Teacher_Name, Teacher_Address, Teacher_Subject, etc. The attribute value gets stored in the database.
The weak entity in DBMS does not have a primary key and are dependent on the parent entity. It mainly depends on other entities, for example, dependents of a professor.
The strong entity has a primary key. It has weak entities that are dependent on strong entity. Its existence is not dependent on any other entity.
For example, Professor is a strong entity −
Every table has one Primary key and cannot have null values. A primary key can be StudentID, SSN, AccountNumber, etc.
An attribute that has multiple values for a single entity at a time is called a Multivalued Attribute.
For example, technical skills of a student that can be programming, web development, etc.
If an attribute has two or more other attributes, then it is called a Composite Attribute.
For example, Student Name can be divided as Student First Name, Student Middle Name, and Student Last Name.
As the name suggests, the derived attribute is an attribute whose value can be calculated from another attribute.
For example, Student Age can be derived from Date-of-birth of a student.
ER Diagram Example
Here’s an ER Diagram for Hospital:
- It has three entities: Patient, Doctor and Tests.
- Age is a derived attribute for Patient Entity
- Name in the Tests entity is a Primary Key
- ID in the Doctor entity is a Primary Key
- ID in the Patient entity is a Primary Key
- Related Articles
- Importance of Entity-Relationship diagram in database design
- Entity Relationship Participation in Database
- What is Entity-Relationship Modeling?
- Extended Entity-Relationship (EE-R) Model
- What is an Entity relationship model in DBMS?
- Difference between Strong Entity and Weak Entity
- Explain difference between Strong Entity and Weak Entity
- HTML Entity Parser in C++
- Identifying Entity Relationships in DBMS
- Entity Integrity Rule in RDBMS
- Types of Entity Relationships in DBMS
- Difference Between Strong and Weak Entity
- How to identify entity from a given problem
- Brain Behavior Relationship
- Attitude Behavior Relationship