SlideShare ist ein Scribd-Unternehmen logo
1 von 23
CENTRAL PHILIPPINES STATE UNIVERSITY
Fundamental of Database
System
Chapter 2
Data Modelling Using the Entity–Relationship (ER) Model
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Chapter 2:
Data Modeling Using the Entity Relationship
Model
 Component of ER Diagram
 Notation of ER diagram
 Mapping Constraints
 Relationship of higher degree
 DBMS Keys
 Generalization & Aggregation
 Reduction of ER diagram to Table
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
ER (Entity Relationship) Diagram
ER model stands for an Entity-
Relationship model. It is a high-level data
model. This model is used to define the
data elements and relationship for a
specified system.
It develops a conceptual design for the
database. It also develops a very simple
and easy to design view of data.
Figure 1: Student information ERD
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
ER diagrams or ERD’s are composed of
three main elements: entities, attributes,
and relationships.
 Entities
 Attributes
 Relationships
Figure 1: Student information ERD
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
An entity may be any object, class, person or place. In the ER diagram,
an entity can be represented as rectangles.
Consider an organization as an example- manager, product, employee,
department etc. can be taken as an entity.
Figure 3: Entity with relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
An entity that depends on another entity called a weak entity. The
weak entity doesn't contain any key attribute of its own. The weak
entity is represented by a double rectangle.
Figure 4: Weak Entity
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
The attribute is used to
describe the property of an
entity. Eclipse is used to
represent an attribute.
Figure 5:Entity with attributes
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
An attribute that composed of
many other attributes is known
as a composite attribute. The
composite attribute is
represented by an ellipse, and
those ellipses are connected
with an ellipse.
Figure 6: Composite attributes
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
An attribute can have more
than one value. These
attributes are known as a
multivalued attribute. It
represented by an ellipse with
double line.
Figure 7: Multivalued attributes
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
An attribute that can be
derived from other attribute is
known as a derived attribute. It
can be represented by a
dashed ellipse.
Figure 8: Derived attributes
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
The key attribute is used to
represent the main
characteristics of an entity. It
represents a primary key. The
key attribute is represented by
an ellipse with the text
underlined.
Figure 9:Entity with primary attribute
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
A relationship is used to describe the relation between entities.
Diamond or rhombus is used to represent the relationship.
Figure 10: Entity Relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Mapping Constraints
A mapping constraint is a data constraint that expresses the number
of entities to which another entity can be related via a relationship
set.
For binary relationship set R on an entity set A and B, there are four
possible mapping cardinalities. These are as follows:
 One to one (1:1)
 One to many (1:M)
 Many to one (M:1)
 Many to many (M:M)
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
When only one instance of an entity is associated with the
relationship, then it is known as one to one relationship.
Ex. A female can marry to one male, and a male can marry to one
female
Figure 11: One-to-One Relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
When only one instance of the entity on the left, and more than one
instance of an entity on the right associates with the relationship then
this is known as a one-to-many relationship.
Ex. Scientist can invent many inventions, but the invention is done by
the only specific scientist
Figure 12: One-to-many relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
When more than one instance of the entity on the left, and only one
instance of an entity on the right associates with the relationship then
it is known as a many-to-one relationship.
Ex. Student enrolls for only one course, but a course can have many
students
Figure 13: Many-to-one relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Component of ER Diagram
When more than one instance of the entity on the left, and more than
one instance of an entity on the right associates with the relationship
then it is known as a many-to-many relationship.
Ex. Employee can assign by many projects and project can have many
employees.
Figure 14: Many-to-many relationship
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Notation of ER diagram
Database can be
represented using the
notations. In ER diagram,
many notations are used to
express the cardinality.
Figure 15: Notation Diagram
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
The ER diagram
Figure 16: Student Information ERD
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Generalization
Generalization is like a bottom-up
approach in which two or more
entities of lower level combine to
form a higher level entity if they
have some attributes in common.
Generalization is more like subclass
and superclass system, but the only
difference is the approach.
Generalization uses the bottom-up
approach. Faculty and Student entities can be
generalized and create a higher level
entity Person.
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Specialization
Specialization is a top-down
approach, and it is opposite to
Generalization. In specialization,
one higher level entity can be
broken down into two lower level
entities
the superclass is defined first, the
subclass and its related attributes
are defined next, and relationship
set are then added. In an Employee management system,
EMPLOYEE entity can be specialized as
TESTER or DEVELOPER based on what
role they play in the company
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Reduction of ER diagram to Table
The database can be represented using the notations, and these
notations can be reduced to a collection of tables.
There are some points for converting the ER diagram to the table:
 Entity type becomes a table.
 All single-valued attribute becomes a column for the table.
 A key attribute of the entity type represented by the primary key.
 The multivalued attribute is represented by a separate table.
 Composite attribute represented by components.
 Derived attributes are not considered in the table.
CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY
Reduction of ER diagram to Table
Table structure
ER diagram

Weitere ähnliche Inhalte

Ähnlich wie Chapter 2 of Fundamental of Database System.pptx

Unit1 rdbms study_materials
Unit1 rdbms study_materialsUnit1 rdbms study_materials
Unit1 rdbms study_materialsgayaramesh
 
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)gayaramesh
 
Er model ppt
Er model pptEr model ppt
Er model pptPihu Goel
 
ermodelppt-181229121745.pptx
ermodelppt-181229121745.pptxermodelppt-181229121745.pptx
ermodelppt-181229121745.pptxThangamaniR3
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML نبيله نواز
 
Administrator of Online Examination has multiple features such as Add, Delete...
Administrator of Online Examination has multiple features such as Add, Delete...Administrator of Online Examination has multiple features such as Add, Delete...
Administrator of Online Examination has multiple features such as Add, Delete...ayushi296420
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Sciencedrprkr74
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxnirajsharmapuneiat
 
Sql server ___________session2-data_modeling
Sql server  ___________session2-data_modelingSql server  ___________session2-data_modeling
Sql server ___________session2-data_modelingEhtisham Ali
 
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 Basessuser2ea8ea1
 
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...Niloy Biswas
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptxsandeep54552
 

Ähnlich wie Chapter 2 of Fundamental of Database System.pptx (20)

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 model ppt
Er model pptEr model ppt
Er model ppt
 
ermodelppt-181229121745.pptx
ermodelppt-181229121745.pptxermodelppt-181229121745.pptx
ermodelppt-181229121745.pptx
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Administrator of Online Examination has multiple features such as Add, Delete...
Administrator of Online Examination has multiple features such as Add, Delete...Administrator of Online Examination has multiple features such as Add, Delete...
Administrator of Online Examination has multiple features such as Add, Delete...
 
Er model
Er modelEr model
Er model
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Science
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
 
UNIT II DBMS.pptx
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptx
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational ModelB.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Sql server ___________session2-data_modeling
Sql server  ___________session2-data_modelingSql server  ___________session2-data_modeling
Sql server ___________session2-data_modeling
 
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
 
DBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship ModelDBMS 2 | Entity Relationship Model
DBMS 2 | Entity Relationship Model
 
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
database.pptx
database.pptxdatabase.pptx
database.pptx
 

Kürzlich hochgeladen

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Kürzlich hochgeladen (20)

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Chapter 2 of Fundamental of Database System.pptx

  • 1. CENTRAL PHILIPPINES STATE UNIVERSITY Fundamental of Database System Chapter 2 Data Modelling Using the Entity–Relationship (ER) Model
  • 2. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Chapter 2: Data Modeling Using the Entity Relationship Model  Component of ER Diagram  Notation of ER diagram  Mapping Constraints  Relationship of higher degree  DBMS Keys  Generalization & Aggregation  Reduction of ER diagram to Table
  • 3. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY ER (Entity Relationship) Diagram ER model stands for an Entity- Relationship model. It is a high-level data model. This model is used to define the data elements and relationship for a specified system. It develops a conceptual design for the database. It also develops a very simple and easy to design view of data. Figure 1: Student information ERD
  • 4. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram ER diagrams or ERD’s are composed of three main elements: entities, attributes, and relationships.  Entities  Attributes  Relationships Figure 1: Student information ERD
  • 5. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram An entity may be any object, class, person or place. In the ER diagram, an entity can be represented as rectangles. Consider an organization as an example- manager, product, employee, department etc. can be taken as an entity. Figure 3: Entity with relationship
  • 6. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram An entity that depends on another entity called a weak entity. The weak entity doesn't contain any key attribute of its own. The weak entity is represented by a double rectangle. Figure 4: Weak Entity
  • 7. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute. Figure 5:Entity with attributes
  • 8. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram An attribute that composed of many other attributes is known as a composite attribute. The composite attribute is represented by an ellipse, and those ellipses are connected with an ellipse. Figure 6: Composite attributes
  • 9. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram An attribute can have more than one value. These attributes are known as a multivalued attribute. It represented by an ellipse with double line. Figure 7: Multivalued attributes
  • 10. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram An attribute that can be derived from other attribute is known as a derived attribute. It can be represented by a dashed ellipse. Figure 8: Derived attributes
  • 11. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram The key attribute is used to represent the main characteristics of an entity. It represents a primary key. The key attribute is represented by an ellipse with the text underlined. Figure 9:Entity with primary attribute
  • 12. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram A relationship is used to describe the relation between entities. Diamond or rhombus is used to represent the relationship. Figure 10: Entity Relationship
  • 13. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Mapping Constraints A mapping constraint is a data constraint that expresses the number of entities to which another entity can be related via a relationship set. For binary relationship set R on an entity set A and B, there are four possible mapping cardinalities. These are as follows:  One to one (1:1)  One to many (1:M)  Many to one (M:1)  Many to many (M:M)
  • 14. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram When only one instance of an entity is associated with the relationship, then it is known as one to one relationship. Ex. A female can marry to one male, and a male can marry to one female Figure 11: One-to-One Relationship
  • 15. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram When only one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then this is known as a one-to-many relationship. Ex. Scientist can invent many inventions, but the invention is done by the only specific scientist Figure 12: One-to-many relationship
  • 16. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram When more than one instance of the entity on the left, and only one instance of an entity on the right associates with the relationship then it is known as a many-to-one relationship. Ex. Student enrolls for only one course, but a course can have many students Figure 13: Many-to-one relationship
  • 17. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Component of ER Diagram When more than one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then it is known as a many-to-many relationship. Ex. Employee can assign by many projects and project can have many employees. Figure 14: Many-to-many relationship
  • 18. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Notation of ER diagram Database can be represented using the notations. In ER diagram, many notations are used to express the cardinality. Figure 15: Notation Diagram
  • 19. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY The ER diagram Figure 16: Student Information ERD
  • 20. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Generalization Generalization is like a bottom-up approach in which two or more entities of lower level combine to form a higher level entity if they have some attributes in common. Generalization is more like subclass and superclass system, but the only difference is the approach. Generalization uses the bottom-up approach. Faculty and Student entities can be generalized and create a higher level entity Person.
  • 21. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Specialization Specialization is a top-down approach, and it is opposite to Generalization. In specialization, one higher level entity can be broken down into two lower level entities the superclass is defined first, the subclass and its related attributes are defined next, and relationship set are then added. In an Employee management system, EMPLOYEE entity can be specialized as TESTER or DEVELOPER based on what role they play in the company
  • 22. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Reduction of ER diagram to Table The database can be represented using the notations, and these notations can be reduced to a collection of tables. There are some points for converting the ER diagram to the table:  Entity type becomes a table.  All single-valued attribute becomes a column for the table.  A key attribute of the entity type represented by the primary key.  The multivalued attribute is represented by a separate table.  Composite attribute represented by components.  Derived attributes are not considered in the table.
  • 23. CENTRAL PHILIPPINES STATE UNIVERSITY CENTRAL PHILIPPINES STATE UNIVERSITY Reduction of ER diagram to Table Table structure ER diagram