SlideShare ist ein Scribd-Unternehmen logo
1 von 15
The Entity Relationship Model
 ER model was introduced by peter Chenn in 1976.
 The ER model defines the conceptual (or logical) view of a database.
 It is used for designing
 It works around real world entities and the relationships among them.
 A database schema in the ER model can be represented pictorially as ER diagram.
 An ER diagram maps well into a relational schema.
Why ER model is useful
 An ER Model maps well to the relational model i.e the constructs used in ER Model
can be easily transformed into relational tables.
 An ER Model can be used by the database designer communicate the database design
to the user.
 An ER Model can be used as a design plan by the database developer to implement
data model in specific DBMS software.
ER Modeling constructs
 Entity
 Attributes
 Relationships
1. Entities
 An Entity is a “thing” or “object” in the real world that is distinguishable from other objects.
 Entity can be any thing that has independent existence and about which we collect data. It is also
called entity type.
Example: in a school database, the students, teacher , classes, courses or projects can be taken as
an entity.
 Entities are represented by means of rectangles.
 Entities have attributes that give them their identity.
Example: students have rollno, name, and address
 Entities become table in relational model.
Student Teacher Course
Entity set
 An Entity Set is a collection of similar type of entities, that share same attribute.
Example: A student set may contain all the students of a school; A teacher set may contain all the
teachers of a school from all faculties.
Entity set
 Entity set need not be disjoint
Example: The entity set Employee(all employee of a bank) and the entity set customer (all customers
of Bank) may have members in common.
E1
E2
E3
2. Attribute
 An entity is represented by a set of attribute.
 Attribute are used to describe the property of an entity
Example: a student entity may have roll_no, Name, DOB, Age, Address, Mobile_no as
attribute.
 For each attribute there is a set of permitted values, called domain (or range) of that
attribute.
Example: A student name cannot be a numeric value. It has to be alphabetic. A student’s age
cannot be negative, etc. A student roll_no can be numeric between some range like(0-10000)
 Attribute are represented by Ellipse
Attribute
Example:
Schema (Entity type):
Student (Roll_No, Name, DOB, Address)
Entity 1: 101, Rahul Sharma,12-10-2005, Delhi
Entity 2: 102, Seema Singh, 15-12-2007, Jaipur
Student
Roll_No
Name DOB
Address
Attribute Types
 composite attribute
 multi valued attribute
 derived attribute
 Key attribute
3. Relationship
 A relationship is an association among entities.
 For example :
 An employee works_at a department
 A student enrolls in a course
Here, works_at and enrolls are called relationship
 Relationship are represented by diamond-shaped box.
Relationship
Example
Employee Department
Works _at
Student
Course
Enrolled_in
Degree of Relationship
 The number of different entity sets participating in a relationship set is called a degree
of a relationship set
1. Unary
2. Binary
3. Ternary
4. N-ary
Degree of Relationship


1. Unary relationship: (degree =1)
A unary relationship is only one entity participate in a relationship, the relationship is called as a unary
relationship.
For example, one person is married to only one person.
2. Binary relationship: (degree=2)
A binary relationship is when two entities participate in a relationship, and is the most common relationship
degree.
For example: student is enrolled in course.
Person Married_to
Course
Enrolled
Degree of Relationship

..
3. Ternary Relationship: (degree=3)
A ternary relationship is when three entities participate in the relationship.
example, the university might need to record which teachers taught which courses.
4. n-ary relationship: (degree=n)
When there are n entities set participating in a relation, the relationship is called n-ary
relationship.
Course Subject
CST
Teacher
Relationship Constraints:
1. Cardinality ratio
 Maximum number of relationship instances that an entity can participate in.
 Possible cardinality ratios for binary relationship -> 1:1, 1:N, N:1, M:N
Employee Department
Manage
s
1 1
Employee Works_f
or
Department
N 1
Student Department
studies
M N
Relationship Constraints:
2. Participation Constraints
 Specifies whether existence of an entity depends on its being related to another entity.
 2 types : total participation and partial participation
Employee Manages Employee
Partial Total
Employee Manages Department
E1
E2
E3
E4
E5
D1
D2
D3
d4

Weitere Àhnliche Inhalte

Ähnlich wie 5e7ry754.pptx

Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
Dr. C.V. Suresh Babu
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
fanta teferi
 

Ähnlich wie 5e7ry754.pptx (20)

Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Database
DatabaseDatabase
Database
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
Er model
Er modelEr model
Er model
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
 
Design issues with constraints of E-R model
Design issues with constraints of E-R modelDesign issues with constraints of E-R model
Design issues with constraints of E-R model
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Entity Relationship Diagram part9
Entity Relationship Diagram part9Entity Relationship Diagram part9
Entity Relationship Diagram part9
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER model
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 
ER Diagram- Cardinality.pptx
ER Diagram- Cardinality.pptxER Diagram- Cardinality.pptx
ER Diagram- Cardinality.pptx
 
Data base lec3 (erd)
Data base lec3 (erd)Data base lec3 (erd)
Data base lec3 (erd)
 
Unit i b(er model)
Unit i b(er model)Unit i b(er model)
Unit i b(er model)
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..
 

KÃŒrzlich hochgeladen

independent Call Girls West Sikkim 9332606886 ust Genuine Escort Model Sevice
independent Call Girls West Sikkim  9332606886  ust Genuine Escort Model Seviceindependent Call Girls West Sikkim  9332606886  ust Genuine Escort Model Sevice
independent Call Girls West Sikkim 9332606886 ust Genuine Escort Model Sevice
Sareena Khatun
 
thesis of copper nanoparticles and their relevance
thesis of copper nanoparticles and their relevancethesis of copper nanoparticles and their relevance
thesis of copper nanoparticles and their relevance
DiptiPriya6
 
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
funaxa
 
High Profile Call Girls Service in Sangli 9332606886 HOT & SEXY Models beaut...
High Profile Call Girls Service in Sangli  9332606886 HOT & SEXY Models beaut...High Profile Call Girls Service in Sangli  9332606886 HOT & SEXY Models beaut...
High Profile Call Girls Service in Sangli 9332606886 HOT & SEXY Models beaut...
Sareena Khatun
 

KÃŒrzlich hochgeladen (20)

Balanced Diet, Modified Diet, RDA and Menu Planning.pptx
Balanced Diet, Modified Diet, RDA and Menu Planning.pptxBalanced Diet, Modified Diet, RDA and Menu Planning.pptx
Balanced Diet, Modified Diet, RDA and Menu Planning.pptx
 
Call girls Service Nadiad / 8250092165 Genuine Call girls with real Photos an...
Call girls Service Nadiad / 8250092165 Genuine Call girls with real Photos an...Call girls Service Nadiad / 8250092165 Genuine Call girls with real Photos an...
Call girls Service Nadiad / 8250092165 Genuine Call girls with real Photos an...
 
Call Girls Pune ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Pune ( 8250092165 ) Cheap rates call girls | Get low budgetCall Girls Pune ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Pune ( 8250092165 ) Cheap rates call girls | Get low budget
 
Call Girls in Moshi - 8250092165 Our call girls are sure to provide you with ...
Call Girls in Moshi - 8250092165 Our call girls are sure to provide you with ...Call Girls in Moshi - 8250092165 Our call girls are sure to provide you with ...
Call Girls in Moshi - 8250092165 Our call girls are sure to provide you with ...
 
independent Call Girls West Sikkim 9332606886 ust Genuine Escort Model Sevice
independent Call Girls West Sikkim  9332606886  ust Genuine Escort Model Seviceindependent Call Girls West Sikkim  9332606886  ust Genuine Escort Model Sevice
independent Call Girls West Sikkim 9332606886 ust Genuine Escort Model Sevice
 
thesis of copper nanoparticles and their relevance
thesis of copper nanoparticles and their relevancethesis of copper nanoparticles and their relevance
thesis of copper nanoparticles and their relevance
 
Call girls Service Nacharam - 8250092165 Our call girls are sure to provide y...
Call girls Service Nacharam - 8250092165 Our call girls are sure to provide y...Call girls Service Nacharam - 8250092165 Our call girls are sure to provide y...
Call girls Service Nacharam - 8250092165 Our call girls are sure to provide y...
 
The Codex Alimentarius Commission (CAC).
The Codex Alimentarius Commission (CAC).The Codex Alimentarius Commission (CAC).
The Codex Alimentarius Commission (CAC).
 
Foreigner Call Girls in junagadh 8250092165 Call Girls Advance Cash On Deliv...
Foreigner Call Girls in junagadh  8250092165 Call Girls Advance Cash On Deliv...Foreigner Call Girls in junagadh  8250092165 Call Girls Advance Cash On Deliv...
Foreigner Call Girls in junagadh 8250092165 Call Girls Advance Cash On Deliv...
 
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
原版1:1定制(IC倧孊毕䞚证)垝囜理工孊院倧孊毕䞚证囜倖文凭倍刻成绩单#电子版制䜜#留信入库#倚幎经营绝对保证莚量
 
Call girls Service Songadh / 8250092165 Genuine Call girls with real Photos a...
Call girls Service Songadh / 8250092165 Genuine Call girls with real Photos a...Call girls Service Songadh / 8250092165 Genuine Call girls with real Photos a...
Call girls Service Songadh / 8250092165 Genuine Call girls with real Photos a...
 
Call Girls Kothrud / 8250092165 Genuine Call girls with real Photos and Number
Call Girls Kothrud / 8250092165 Genuine Call girls with real Photos and NumberCall Girls Kothrud / 8250092165 Genuine Call girls with real Photos and Number
Call Girls Kothrud / 8250092165 Genuine Call girls with real Photos and Number
 
Arjunganj % (Genuine) Escort Service Lucknow | Book 9548273370 Extreme Naught...
Arjunganj % (Genuine) Escort Service Lucknow | Book 9548273370 Extreme Naught...Arjunganj % (Genuine) Escort Service Lucknow | Book 9548273370 Extreme Naught...
Arjunganj % (Genuine) Escort Service Lucknow | Book 9548273370 Extreme Naught...
 
High Profile Call Girls Service in Sangli 9332606886 HOT & SEXY Models beaut...
High Profile Call Girls Service in Sangli  9332606886 HOT & SEXY Models beaut...High Profile Call Girls Service in Sangli  9332606886 HOT & SEXY Models beaut...
High Profile Call Girls Service in Sangli 9332606886 HOT & SEXY Models beaut...
 
Berhampur Escorts Service Girl ^ 9332606886, WhatsApp Anytime Berhampur
Berhampur Escorts Service Girl ^ 9332606886, WhatsApp Anytime BerhampurBerhampur Escorts Service Girl ^ 9332606886, WhatsApp Anytime Berhampur
Berhampur Escorts Service Girl ^ 9332606886, WhatsApp Anytime Berhampur
 
Call Girls Surat ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Surat ( 8250092165 ) Cheap rates call girls | Get low budgetCall Girls Surat ( 8250092165 ) Cheap rates call girls | Get low budget
Call Girls Surat ( 8250092165 ) Cheap rates call girls | Get low budget
 
Call Girls in Rajpur Sonarpur / 8250092165 Genuine Call girls with real Photo...
Call Girls in Rajpur Sonarpur / 8250092165 Genuine Call girls with real Photo...Call Girls in Rajpur Sonarpur / 8250092165 Genuine Call girls with real Photo...
Call Girls in Rajpur Sonarpur / 8250092165 Genuine Call girls with real Photo...
 
Call girls Service Bogmalo ( 8250092165 ) Cheap rates call girls | Get low bu...
Call girls Service Bogmalo ( 8250092165 ) Cheap rates call girls | Get low bu...Call girls Service Bogmalo ( 8250092165 ) Cheap rates call girls | Get low bu...
Call girls Service Bogmalo ( 8250092165 ) Cheap rates call girls | Get low bu...
 
Charbagh \ Book Call Girls in Lucknow Finest Escorts Service 9548273370 Avail...
Charbagh \ Book Call Girls in Lucknow Finest Escorts Service 9548273370 Avail...Charbagh \ Book Call Girls in Lucknow Finest Escorts Service 9548273370 Avail...
Charbagh \ Book Call Girls in Lucknow Finest Escorts Service 9548273370 Avail...
 
HiFi Call Girl Service Hyderabad | Whatsapp No 📞 9352988975 📞 VIP Escorts Ser...
HiFi Call Girl Service Hyderabad | Whatsapp No 📞 9352988975 📞 VIP Escorts Ser...HiFi Call Girl Service Hyderabad | Whatsapp No 📞 9352988975 📞 VIP Escorts Ser...
HiFi Call Girl Service Hyderabad | Whatsapp No 📞 9352988975 📞 VIP Escorts Ser...
 

5e7ry754.pptx

  • 1. The Entity Relationship Model  ER model was introduced by peter Chenn in 1976.  The ER model defines the conceptual (or logical) view of a database.  It is used for designing  It works around real world entities and the relationships among them.  A database schema in the ER model can be represented pictorially as ER diagram.  An ER diagram maps well into a relational schema.
  • 2. Why ER model is useful  An ER Model maps well to the relational model i.e the constructs used in ER Model can be easily transformed into relational tables.  An ER Model can be used by the database designer communicate the database design to the user.  An ER Model can be used as a design plan by the database developer to implement data model in specific DBMS software.
  • 3. ER Modeling constructs  Entity  Attributes  Relationships
  • 4. 1. Entities  An Entity is a “thing” or “object” in the real world that is distinguishable from other objects.  Entity can be any thing that has independent existence and about which we collect data. It is also called entity type. Example: in a school database, the students, teacher , classes, courses or projects can be taken as an entity.  Entities are represented by means of rectangles.  Entities have attributes that give them their identity. Example: students have rollno, name, and address  Entities become table in relational model. Student Teacher Course
  • 5. Entity set  An Entity Set is a collection of similar type of entities, that share same attribute. Example: A student set may contain all the students of a school; A teacher set may contain all the teachers of a school from all faculties. Entity set  Entity set need not be disjoint Example: The entity set Employee(all employee of a bank) and the entity set customer (all customers of Bank) may have members in common. E1 E2 E3
  • 6. 2. Attribute  An entity is represented by a set of attribute.  Attribute are used to describe the property of an entity Example: a student entity may have roll_no, Name, DOB, Age, Address, Mobile_no as attribute.  For each attribute there is a set of permitted values, called domain (or range) of that attribute. Example: A student name cannot be a numeric value. It has to be alphabetic. A student’s age cannot be negative, etc. A student roll_no can be numeric between some range like(0-10000)  Attribute are represented by Ellipse Attribute
  • 7. Example: Schema (Entity type): Student (Roll_No, Name, DOB, Address) Entity 1: 101, Rahul Sharma,12-10-2005, Delhi Entity 2: 102, Seema Singh, 15-12-2007, Jaipur Student Roll_No Name DOB Address
  • 8. Attribute Types  composite attribute  multi valued attribute  derived attribute  Key attribute
  • 9. 3. Relationship  A relationship is an association among entities.  For example :  An employee works_at a department  A student enrolls in a course Here, works_at and enrolls are called relationship  Relationship are represented by diamond-shaped box. Relationship
  • 11. Degree of Relationship  The number of different entity sets participating in a relationship set is called a degree of a relationship set 1. Unary 2. Binary 3. Ternary 4. N-ary
  • 12. Degree of Relationship

 1. Unary relationship: (degree =1) A unary relationship is only one entity participate in a relationship, the relationship is called as a unary relationship. For example, one person is married to only one person. 2. Binary relationship: (degree=2) A binary relationship is when two entities participate in a relationship, and is the most common relationship degree. For example: student is enrolled in course. Person Married_to Course Enrolled
  • 13. Degree of Relationship

.. 3. Ternary Relationship: (degree=3) A ternary relationship is when three entities participate in the relationship. example, the university might need to record which teachers taught which courses. 4. n-ary relationship: (degree=n) When there are n entities set participating in a relation, the relationship is called n-ary relationship. Course Subject CST Teacher
  • 14. Relationship Constraints: 1. Cardinality ratio  Maximum number of relationship instances that an entity can participate in.  Possible cardinality ratios for binary relationship -> 1:1, 1:N, N:1, M:N Employee Department Manage s 1 1 Employee Works_f or Department N 1 Student Department studies M N
  • 15. Relationship Constraints: 2. Participation Constraints  Specifies whether existence of an entity depends on its being related to another entity.  2 types : total participation and partial participation Employee Manages Employee Partial Total Employee Manages Department E1 E2 E3 E4 E5 D1 D2 D3 d4