SlideShare a Scribd company logo
1 of 12
Assignment -1
Name: Kameshwari
Reg No: PG20153
Entity Relationship Diagram – ER Diagram in DBMS
An Entity–relationship model (ER model) describes the structure of a database with the help of
a diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a
design or blueprint of a database that can later be implemented as a database. The main
components of E-R model are: entity set and relationship set.
What is an Entity Relationship Diagram (ER Diagram)?
An ER diagram shows the relationship among entity sets. An entity set is a group of similar
entities and these entities can have attributes. In terms of DBMS, an entity is a table or attribute
of a table in database, so by showing relationship among tables and their attributes, ER diagram
shows the complete logical structure of a database. Lets have a look at a simple ER diagram to
understand this concept.
A simple ER Diagram:
In the following diagram we have two entities Student and College and their relationship. The
relationship between Student and College is many to one as a college can have many students
however a student cannot study in multiple colleges at the same time. Student entity has
attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has attributes such as
Col_ID & Col_Name.
Here are the geometric shapes and their meaning in an E-R Diagram. We will discuss these terms
in detail in the next section(Components of a ER Diagram) of this guide so don’t worry too much
about these terms now, just go through them once.
Rectangle: Represents Entity sets.
Ellipses: Attributes
Diamonds: Relationship Set
Lines: They link attributes to Entity Sets and Entity sets to Relationship Set
Double Ellipses: Multivalued Attributes
Dashed Ellipses: Derived Attributes
Double Rectangles: Weak Entity Sets
Double Lines: Total participation of an entity in a relationship set
Components of a ER Diagram
As shown in the above diagram, an ER diagram has three main components:
1. Entity
2. Attribute
3. Relationship
1. Entity
An entity is an object or component of data. An entity is represented as rectangle in an ER
diagram.
For example: In the following ER diagram we have two entities Student and College and these
two entities have many to one relationship as many students study in a single college. We will
read more about relationships later, for now focus on entities.
WeakEntity:
An entity that cannot be uniquely identified by its own attributes and relies on the relationship
with other entity is called weak entity. The weak entity is represented by a double rectangle. For
example – a bank account cannot be uniquely identified without knowing the bank to which the
account belongs, so bank account is a weak entity.
2. Attribute
An attribute describes the property of an entity. An attribute is represented as Oval in an ER
diagram. There are four types of attributes:
1.Key attribute
2.Composite attribute
3.Multivalued attribute
4. Derived attribute
1. Key attribute:
A key attribute can uniquely identify an entity from an entity set. For example, student roll
number can uniquely identify a student from a set of students. Key attribute is represented by
oval same as other attributes however the text of key attribute is underlined.
2. Composite attribute:
An attribute that is a combination of other attributes is known as composite attribute. For
example, in student entity, the student address is a composite attribute as an address is composed
of other attributes such as pin code, state, country.
3. Multivalve attribute:
An attribute that can hold multiple values is known as multivalued attribute. It is represented
with double ovals in an ER Diagram. For example – A person can have more than one phone
numbers so the phone number attribute is multivalued.
4. Derived attribute:
A derived attribute is one whose value is dynamic and derived from another attribute. It is
represented by dashed oval in an ER Diagram. For example – Person age is a derived attribute
as it changes over time and can be derived from another attribute (Date of birth).
E-R diagram with multivalued and derived attributes:
3. Relationship
A relationship is represented by diamond shape in ER diagram, it shows the relationship among
entities. There are four types of relationships:
1.One to One
2.One to Many
3.Many to One
4. Many to Many
1. One to One Relationship
When a single instance of an entity is associated with a single instance of another entity then it is
called one to one relationship. For example, a person has only one passport and a passport is
given to one person.
2. One to Many Relationship
When a single instance of an entity is associated with more than one instances of another entity
then it is called one to many relationship. For example – a customer can place many orders but a
order cannot be placed by many customers.
3. Many to One Relationship
When more than one instances of an entity is associated with a single instance of another entity
then it is called many to one relationship. For example – many students can study in a single
college but a student cannot study in many colleges at the same time.
4. Many to Many Relationship
When more than one instances of an entity is associated with more than one instances of another
entity then it is called many to many relationship. For example, a can be assigned to many
projects and a project can be assigned to many students.
Total Participation of an Entity set
A Total participation of an entity set represents that each entity in entity set must have at least
one relationship in a relationship set. For example: In the below diagram each college must have
at-least one associated Student.
ENTITIES: Admin, Students, Teachers, Courses
ATTRIBUTES: Login name, password, personal details, Education, Fees, Duration etc.
RELATIONS: Student and Course, Teacher and Course, Admin and Course.
CARDINALITIES: This are all are mandatory cardinality relations as well.
This is a basic student Management system.
Here Admin is having the attributes of Password, Login Name, Name, and AID.
Course is having the attributes of CID, CName, Fees, and Duration.
Teacher is having the attributes TID, TName, Course, and Education.
Student is having the attributes Fees Details, Personal Details, Education Detail, Name
etc.
Here All the IDS SID, TID, CID, AID this entire are the primary keys and unique keys.
This diagram explains regarding the basic admin process and allocating of course for the
student.
ER Diagram For Hospitatility Management:
ENTITIES: Doctors, Patients, Tests
SINGLE ATTRIBUTES: Address, Date, Description, Details etc
MULTIVALUED ATTRIBUTES: Specialization, Qualification
KEY ATTRIBUTE : Name, Type
Doctor Entity is having attributes of name, address, specialization, qualification.
Patients Entity is having an type, details etc.
Tests Entity is having Type, Description
There are some attributes with relation disease, treatment etc.
Here this is a ER diagram which deals with the patient and type of treatment which each
doctor can provide
What are the tests to be done for the patient according to his diseases?
Specialization is a multi attribute where it is used for different purposes.
This is a basic ER diagram for the hospitality management.
ENTITIES: Books, Publisher, Member
KEY ATTRIBUTES: Book ID, Memb ID
ATTRIBUTES: Price, availability, Author etc
RELATIONS: Books to Publisher, books to member etc
This ER diagram explains how a basic library system.
How a books to be published and how a member can borrow the books from library

More Related Content

Similar to ER Diagram_Kameshwari.docx

Similar to ER Diagram_Kameshwari.docx (20)

Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
database
databasedatabase
database
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER model
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
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 ..
 
ER modelling used for extracting query from Data Base
ER modelling used for extracting query from Data BaseER modelling used for extracting query from Data Base
ER modelling used for extracting query from Data Base
 
E r model
E r modelE r model
E r model
 
Database
DatabaseDatabase
Database
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
ER diagram
ER diagramER diagram
ER diagram
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
Unit1 rdbms study_materials
Unit1 rdbms study_materialsUnit1 rdbms study_materials
Unit1 rdbms study_materials
 
Unit1 rdbms study_materials-converted (1) (1)
Unit1 rdbms study_materials-converted (1) (1)Unit1 rdbms study_materials-converted (1) (1)
Unit1 rdbms study_materials-converted (1) (1)
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er model
Er modelEr model
Er model
 
ER-Diagram.pptx
ER-Diagram.pptxER-Diagram.pptx
ER-Diagram.pptx
 

More from KameshwariPurusothma

Case Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxCase Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxKameshwariPurusothma
 
Cash Flow_Kameshwari_Assignment 3.docx
Cash Flow_Kameshwari_Assignment 3.docxCash Flow_Kameshwari_Assignment 3.docx
Cash Flow_Kameshwari_Assignment 3.docxKameshwariPurusothma
 
Assignment-2_Capital Structure.docx
Assignment-2_Capital Structure.docxAssignment-2_Capital Structure.docx
Assignment-2_Capital Structure.docxKameshwariPurusothma
 
Ethical Dilemma Case Study (O.B).docx.pptx
Ethical Dilemma Case Study (O.B).docx.pptxEthical Dilemma Case Study (O.B).docx.pptx
Ethical Dilemma Case Study (O.B).docx.pptxKameshwariPurusothma
 
Case Study (The Hidden Traps in Decision Making).pptx
Case Study (The Hidden Traps in Decision Making).pptxCase Study (The Hidden Traps in Decision Making).pptx
Case Study (The Hidden Traps in Decision Making).pptxKameshwariPurusothma
 
Case Study (Old Hands or New Blood).pptx
Case Study (Old Hands or New Blood).pptxCase Study (Old Hands or New Blood).pptx
Case Study (Old Hands or New Blood).pptxKameshwariPurusothma
 
Case Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxCase Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxKameshwariPurusothma
 

More from KameshwariPurusothma (8)

Case Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxCase Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptx
 
Virtual Reality Training.pptx
Virtual Reality Training.pptxVirtual Reality Training.pptx
Virtual Reality Training.pptx
 
Cash Flow_Kameshwari_Assignment 3.docx
Cash Flow_Kameshwari_Assignment 3.docxCash Flow_Kameshwari_Assignment 3.docx
Cash Flow_Kameshwari_Assignment 3.docx
 
Assignment-2_Capital Structure.docx
Assignment-2_Capital Structure.docxAssignment-2_Capital Structure.docx
Assignment-2_Capital Structure.docx
 
Ethical Dilemma Case Study (O.B).docx.pptx
Ethical Dilemma Case Study (O.B).docx.pptxEthical Dilemma Case Study (O.B).docx.pptx
Ethical Dilemma Case Study (O.B).docx.pptx
 
Case Study (The Hidden Traps in Decision Making).pptx
Case Study (The Hidden Traps in Decision Making).pptxCase Study (The Hidden Traps in Decision Making).pptx
Case Study (The Hidden Traps in Decision Making).pptx
 
Case Study (Old Hands or New Blood).pptx
Case Study (Old Hands or New Blood).pptxCase Study (Old Hands or New Blood).pptx
Case Study (Old Hands or New Blood).pptx
 
Case Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptxCase Study (Bonuses in Bad Time).pptx
Case Study (Bonuses in Bad Time).pptx
 

Recently uploaded

内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士
内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士
内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士obuhobo
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...gurkirankumar98700
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一Fs sss
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call GirlsDelhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girlsshivangimorya083
 
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...Suhani Kapoor
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...Suhani Kapoor
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterHector Del Castillo, CPM, CPMM
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证nhjeo1gg
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfDivyeshPatel234692
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyOrtega Alikwe
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...shivangimorya083
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...Suhani Kapoor
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一lvtagr7
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipSoham Mondal
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackSuhani Kapoor
 
Ioannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfIoannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfjtzach
 
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...Suhani Kapoor
 

Recently uploaded (20)

内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士
内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士
内布拉斯加大学林肯分校毕业证录取书( 退学 )学位证书硕士
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
 
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call GirlsDelhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
 
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...
VIP Russian Call Girls in Amravati Deepika 8250192130 Independent Escort Serv...
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring Chapter
 
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
原版快速办理MQU毕业证麦考瑞大学毕业证成绩单留信学历认证
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary Photography
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
 
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
定制(UQ毕业证书)澳洲昆士兰大学毕业证成绩单原版一比一
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management Internship
 
Young Call~Girl in Pragati Maidan New Delhi 8448380779 Full Enjoy Escort Service
Young Call~Girl in Pragati Maidan New Delhi 8448380779 Full Enjoy Escort ServiceYoung Call~Girl in Pragati Maidan New Delhi 8448380779 Full Enjoy Escort Service
Young Call~Girl in Pragati Maidan New Delhi 8448380779 Full Enjoy Escort Service
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
 
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCeCall Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
 
Ioannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfIoannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdf
 
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
 

ER Diagram_Kameshwari.docx

  • 1. Assignment -1 Name: Kameshwari Reg No: PG20153 Entity Relationship Diagram – ER Diagram in DBMS An Entity–relationship model (ER model) describes the structure of a database with the help of a diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a design or blueprint of a database that can later be implemented as a database. The main components of E-R model are: entity set and relationship set. What is an Entity Relationship Diagram (ER Diagram)? An ER diagram shows the relationship among entity sets. An entity set is a group of similar entities and these entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in database, so by showing relationship among tables and their attributes, ER diagram shows the complete logical structure of a database. Lets have a look at a simple ER diagram to understand this concept. A simple ER Diagram: In the following diagram we have two entities Student and College and their relationship. The relationship between Student and College is many to one as a college can have many students however a student cannot study in multiple colleges at the same time. Student entity has attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has attributes such as
  • 2. Col_ID & Col_Name. Here are the geometric shapes and their meaning in an E-R Diagram. We will discuss these terms in detail in the next section(Components of a ER Diagram) of this guide so don’t worry too much about these terms now, just go through them once. Rectangle: Represents Entity sets. Ellipses: Attributes Diamonds: Relationship Set Lines: They link attributes to Entity Sets and Entity sets to Relationship Set Double Ellipses: Multivalued Attributes Dashed Ellipses: Derived Attributes Double Rectangles: Weak Entity Sets Double Lines: Total participation of an entity in a relationship set
  • 3. Components of a ER Diagram As shown in the above diagram, an ER diagram has three main components: 1. Entity 2. Attribute 3. Relationship 1. Entity An entity is an object or component of data. An entity is represented as rectangle in an ER diagram. For example: In the following ER diagram we have two entities Student and College and these two entities have many to one relationship as many students study in a single college. We will read more about relationships later, for now focus on entities.
  • 4. WeakEntity: An entity that cannot be uniquely identified by its own attributes and relies on the relationship with other entity is called weak entity. The weak entity is represented by a double rectangle. For example – a bank account cannot be uniquely identified without knowing the bank to which the account belongs, so bank account is a weak entity. 2. Attribute An attribute describes the property of an entity. An attribute is represented as Oval in an ER diagram. There are four types of attributes: 1.Key attribute 2.Composite attribute 3.Multivalued attribute 4. Derived attribute
  • 5. 1. Key attribute: A key attribute can uniquely identify an entity from an entity set. For example, student roll number can uniquely identify a student from a set of students. Key attribute is represented by oval same as other attributes however the text of key attribute is underlined. 2. Composite attribute: An attribute that is a combination of other attributes is known as composite attribute. For example, in student entity, the student address is a composite attribute as an address is composed
  • 6. of other attributes such as pin code, state, country. 3. Multivalve attribute: An attribute that can hold multiple values is known as multivalued attribute. It is represented with double ovals in an ER Diagram. For example – A person can have more than one phone numbers so the phone number attribute is multivalued. 4. Derived attribute: A derived attribute is one whose value is dynamic and derived from another attribute. It is represented by dashed oval in an ER Diagram. For example – Person age is a derived attribute as it changes over time and can be derived from another attribute (Date of birth).
  • 7. E-R diagram with multivalued and derived attributes: 3. Relationship A relationship is represented by diamond shape in ER diagram, it shows the relationship among entities. There are four types of relationships: 1.One to One 2.One to Many 3.Many to One 4. Many to Many 1. One to One Relationship When a single instance of an entity is associated with a single instance of another entity then it is called one to one relationship. For example, a person has only one passport and a passport is given to one person.
  • 8. 2. One to Many Relationship When a single instance of an entity is associated with more than one instances of another entity then it is called one to many relationship. For example – a customer can place many orders but a order cannot be placed by many customers. 3. Many to One Relationship When more than one instances of an entity is associated with a single instance of another entity then it is called many to one relationship. For example – many students can study in a single college but a student cannot study in many colleges at the same time. 4. Many to Many Relationship When more than one instances of an entity is associated with more than one instances of another entity then it is called many to many relationship. For example, a can be assigned to many
  • 9. projects and a project can be assigned to many students. Total Participation of an Entity set A Total participation of an entity set represents that each entity in entity set must have at least one relationship in a relationship set. For example: In the below diagram each college must have at-least one associated Student.
  • 10. ENTITIES: Admin, Students, Teachers, Courses ATTRIBUTES: Login name, password, personal details, Education, Fees, Duration etc. RELATIONS: Student and Course, Teacher and Course, Admin and Course. CARDINALITIES: This are all are mandatory cardinality relations as well. This is a basic student Management system. Here Admin is having the attributes of Password, Login Name, Name, and AID. Course is having the attributes of CID, CName, Fees, and Duration. Teacher is having the attributes TID, TName, Course, and Education. Student is having the attributes Fees Details, Personal Details, Education Detail, Name etc. Here All the IDS SID, TID, CID, AID this entire are the primary keys and unique keys.
  • 11. This diagram explains regarding the basic admin process and allocating of course for the student. ER Diagram For Hospitatility Management: ENTITIES: Doctors, Patients, Tests SINGLE ATTRIBUTES: Address, Date, Description, Details etc MULTIVALUED ATTRIBUTES: Specialization, Qualification KEY ATTRIBUTE : Name, Type Doctor Entity is having attributes of name, address, specialization, qualification. Patients Entity is having an type, details etc. Tests Entity is having Type, Description There are some attributes with relation disease, treatment etc. Here this is a ER diagram which deals with the patient and type of treatment which each doctor can provide What are the tests to be done for the patient according to his diseases?
  • 12. Specialization is a multi attribute where it is used for different purposes. This is a basic ER diagram for the hospitality management. ENTITIES: Books, Publisher, Member KEY ATTRIBUTES: Book ID, Memb ID ATTRIBUTES: Price, availability, Author etc RELATIONS: Books to Publisher, books to member etc This ER diagram explains how a basic library system. How a books to be published and how a member can borrow the books from library