Entity Relationship Model: ER concepts and Notations

halima9709 4 views 13 slides Mar 03, 2025
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

An ER model is a design or blueprint of a database that can later be implemented as a database. 


Slide Content

Basics of Database Management System (CS-335) UNIT-2 Dr . Halima Sadia Associate Professor Department of CSE Integral University

Unit-2 Entity Relationship Model Concepts. Notation for ER diagram . Types of Attributes & Notations.

Entity Relationship Model Concepts The ER model defines the conceptual view/logical structure of a database . An ER model is a design or blueprint of a database that can later be implemented as a database.  The Entity-Relation model represents real-world entities and the relationship between them . A real-world thing either living or non-living. This model is based on three basic concepts: Entities Attributes Relationships

Notation for ER diagram Entity It may be a physical thing or simply a fact about the enterprise or an event that happens in the real world. An entity can be place, person, object, event or a concept, which stores data in the database. Examples : a customer, student, car or product. Notation : Rectangle Relationship How two or more entities are related to each other. Association between two or more entities. Entities take part in relationships . For example, an employee  works in  a department, a student  enrolls  in a course are called relationship Notation : Diamond Entity_Name Taught By Student Faculty

Notation for ER diagram Entity set: An entity set is a group of similar kind of entities. It may contain entities with attribute sharing similar values. E.g.  Students registered in a particular program and enroll in various courses. A lecturer from the specific department takes each course, and each lecturer teaches various group of students . Attributes: Entities are said to hold certain characteristics or properties called attributes. All attributes have values. For example, a student entity may have rollno ., name , class, age, phone, address, email etc. as attributes . Notation : Oval or Ellipse Roll No

Student Roll No Name D.O.B Phone No Address Email faculty Name Course Phone No Phone No Salary Teaches

Notation for ER diagram Types of Attributes : Simple and Composite Attributes: Simple attributes are atomic values, which cannot be divided further . e .g. roll no, phone no Composite attributes are made of more than one simple attribute . They can be divided into simple attributes e.g. name can be divided into first name, middle name and last name, similarly address can be divided into city, state, pin etc. Single-value and Multi-value Attributes: Single-value attributes contain single value e.g. Aadhar no., PAN etc .  Multi-value attributes may contain more than one values e.g. phone no. and email . Derived Attributes: Attributes whose value can be calculated or derived by some other attribute present e.g. age can be derived from D.O.B. They do not exist in the physical database, but their values are derived from other attributes.

Types of Attributes & Notations Simple and Composite Attributes Single-value and Multi-value Attributes Derived Attributes Simple Attribute : Oval e.g. Single Value : Oval Derived : Dashed oval Composite Attribute : branched ovals e.g. Multi-Value : Double oval Roll No Name First_ Name Middle_Name Last_Name Phone No.

Example ER-Diagram Draw a simple ER-Diagram to depict patient and doctor relationship.

Examples (more) https://123projectlab.com/er-diagram-for-hospital-management-system /

Thank You