SlideShare ist ein Scribd-Unternehmen logo
1 von 31
1
Entity Relationship Modeling
Objectives:
• To illustrate how relationships between entities are defined and refined.
• To know how relationships are incorporated into the database design
process.
• To describe how ERD components affect database design and
implementation.
2
1.0 What is Conceptual Database Design?
• Process of describing the data, relationships
between the data, relationships between the data,
and the constraints on the data.
• After analysis - Gather all the essential data
required and understand how the data are related
• The focus is on the data, rather than on the
processes.
• The output of the conceptual database design is a
Conceptual Data Model ( + Data Dictionary)
3
2.0 Gathering Information for Conceptual Data
Modeling
• Two perspectives
– Top-down
• Data model is derived from an intimate
understanding of the business.
– Bottom-up
• Data model is derived by reviewing specifications
and business documents.
4
2.0 Entity-Relationship (ER) Modeling.
• ER Modeling is a top-down approach to database
design.
• Entity Relationship (ER) Diagram
– A detailed, logical representation of the entities,
associations and data elements for an organization or
business
• Notation uses three main constructs
– Data entities
– Relationships
– Attributes
Chen Model &
Crow’s Foot
Model
Person, place, object, event
or concept about which data
is to be maintained
named property or
characteristic of an
entity
Association
between the
instances of one or
more entity types
Represents a set or collection of
objects in the real world that
share the same properties
Chen Notation
EntityName Verb Phrase AttributeName
Crow’s Foot Notation
EntityName
Entity Attribute
EntityName
List of
Attributes
Relationship
Verb phrase
Acceptable
7
2.1 Entities
• Examples of entities:
– Person: EMPLOYEE, STUDENT, PATIENT
– Place: STORE, WAREHOUSE
– Object: MACHINE, PRODUCT, CAR
– Event: SALE,REGISTRATION, RENEWAL
– Concept: ACCOUNT, COURSE
• Guidelines for naming and defining entity types:
– An entity type name is a singular noun
– An entity type should be descriptive and specific
– An entity name should be concise
– Event entity types should be named for the result of the event, not
the activity or process of the event.
8
2.2 Attributes
• Example of entity types and associated attributes:
STUDENT: Student_ID, Student_Name, Home_Address,
Phone_Number, Major
• Guidelines for naming attributes:
– An attribute name is a noun.
– An attribute name should be unique
– To make an attribute name unique and clear, each attribute name
should follow a standard format
– Similar attributes of different entity types should use similar but
distinguishing names.
9
2.2.1 Identifier Attributes
• Candidate key
– Attribute (or combination of attributes) that uniquely
identifies each instance of an entity type
– Some entities may have more than one candidate key
• Ex: A candidate key for EMPLOYEE is Employee_ID, a second is
the combination of Employee_Name and Address.
• If there is more than one candidate key, need to make a choice.
• Identifier
– A candidate key that has been selected as the unique
identifying characteristic for an entity type
10
2.2.2 Referential Attributes
Name IdNum DeptID Email
Ali 105 LG ali@a.com
Mary 106 IT mary@a.com
John 107 ENG john@a.com
Lim 108 IT lim@a.com
Instance of Lecturer.
Referential attribute: Ties the lecturer entity to
another entity that is department.
• Make Reference to another instance in another table
11
Example
Staff
StaffID
Name Gender
IC
Staff
StaffID
Name
Gender
IC
PK
12
2.3 Relationships
 Associations between instances of one or more entity types that is of interest
 Given a name that describes its function.
• relationship name is an active or a passive verb.
Author Book
Relationship name:
writes
An author writes one or more books
A book can be written by one or more authors.
13
2.3.1 Degree of Relationships
• Degree: number of entity types that participate in a relationship
• Three cases
– Unary: between two instances of one entity type
– Binary: between the instances of two entity types
– Ternary: among the instances of three entity types
14
2.4 Cardinality and Connectivity
• Relationships can be classified as either
• one – to – one
• one – to – many
• many – to –many
• Cardinality : minimum and maximum number of
instances of Entity B that can (or must be)
associated with each instance of entity A.
Connectivity
15
2.4 Cardinality and Connectivity
Professor Class
teaches
A professor teaches class OR
A class is taught by professor
How Many??
Professor Class
teaches
16
2.4 Cardinality and Connectivity
Professor Class
teaches
Professor Class
teaches
1 M
Connectivity
Connectivity
(1,1)
(1,1)
(1,4)
(1,4)
Cardinality
Cardinality
17
2.4.1 Connectivity
• Chen Model
– 1 to represent one.
– M to represent many
• Crow’s Foot
many
One
One or many
1
M
Mandatory one , means (1,1)
Optional? – we’ll see after this
18
2.5 Binary Relationships
• 1:M relationship
– Relational modeling ideal
– Should be the norm in any relational database design
The 1: M relationship between PAINTER and PAINTING
The Implemented 1:M relationship between PAINTER and PAINTING
20
2.5 Binary Relationships
• 1:1 relationship
– Should be rare in any relational database design
– A single entity instance in one entity class is related to a single entity
instance in another entity class
– Could indicate that two entities actually belong in the same table
The 1:1 Relationship Between PROFESSOR and DEPARTMENT
The Implemented
1:1 Relationship
Between
PROFESSOR
and
DEPARTMENT
23
2.5 Binary Relationships
• M:N relationships
– Must be avoided because they lead to data redundancies.
– Can be implemented by breaking it up to produce a set of 1:M
relationships
– Can avoid problems inherent to M:N relationship by creating a
composite entity or bridge entity
• This will be used to link the tables that were originally related
in a M:N relationship
• The composite entity structure includes-as foreign keys-at
least the primary keys of the tables that are to be linked.
The M:N Relationship Between STUDENT and CLASS
This CANNOT be implemented as shown next…..
Bowser
Smithson
Accounting 1 (ACCT-211)
Intro to Microcomputing (CIS-220)
Intro to Statistics (QM-261)
The tables have many redundancies!!
+ CLASS_CODE
CLASS_CODE
+ STU_NUM
Changing the M:N relationship to TWO 1:M relationships
Converting the M:N relationship into TWO 1:M relationships
Foreign keys reference the primary keys in the
other tables of which it has a relationship with
The database designer has 2 main options to
define a composite table’s primary key:
either
use the combination of those foreign
keys or create a new primary key.
28
2.6 Mandatory vs. Optional Cardinalities
• Specifies whether an instance must exist or can be absent in the
relationship
Lecturer Class
handles
A Lecturer may handle zero or many classes.
A class is handled by one and only one Lecturer.
Optional
Mandatory
(0,N)
(1,1)
Lecturer Class
(0,N) (1,1)
handles
1
M
29
2.7 How to Evaluate a Data Model?
• A good data model has the following:
– Accuracy and completeness
– Non redundancy
– Enforcement of business rules
– Data Reusability
– Stability and Flexibility
– Communication Effectiveness
– Simplicity
30
A Common Mistake
Modeling the business processes or functions
instead of the data.
What data we want to keep??
We are interested in modeling the data,
NOT the processes or functions that use
or generate those data.
31
Example:
Member Books
Searches
M N
Is this part of the data requirement?
Are we interested to know the books searched by the members?
If answer is NO, then DO NOT include that as a relationship.
Use other appropriate diagramming techniques to capture the business
processes such as Data Flow Diagram.
Do not mix up the use of ER Modeling with DFD.

Weitere ähnliche Inhalte

Ähnlich wie ERD.ppt

ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSRubal Sagwal
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfInfotech27
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data ModelBishrul Haq
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).pptIshuIswarya3
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxMaryJoseph79
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)PadmapriyaA6
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1SIMONTHOMAS S
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingg30162363
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
EntityrelationshipmodelEnes Bolfidan
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxJasmineMichael1
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfTamiratDejene1
 
Module 1 session 5
Module 1   session 5Module 1   session 5
Module 1 session 5raghuinfo
 

Ähnlich wie ERD.ppt (20)

ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
 
ICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdfICT DBA3 09 0710 Model Data Objects.pdf
ICT DBA3 09 0710 Model Data Objects.pdf
 
2 er
2 er2 er
2 er
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
10287 lecture5(2)
10287 lecture5(2)10287 lecture5(2)
10287 lecture5(2)
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
Unit_2.pdf
Unit_2.pdfUnit_2.pdf
Unit_2.pdf
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
Module 1 session 5
Module 1   session 5Module 1   session 5
Module 1 session 5
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 

Mehr von ubaidullah75790

vu-re-lecture-33 requirement engineering.ppt
vu-re-lecture-33 requirement engineering.pptvu-re-lecture-33 requirement engineering.ppt
vu-re-lecture-33 requirement engineering.pptubaidullah75790
 
Requirement management traceability.ppt
Requirement management  traceability.pptRequirement management  traceability.ppt
Requirement management traceability.pptubaidullah75790
 
SRS for banking system requirement engineer.ppt
SRS for banking system requirement engineer.pptSRS for banking system requirement engineer.ppt
SRS for banking system requirement engineer.pptubaidullah75790
 
Agile Method requirement engineering.ppt
Agile Method requirement engineering.pptAgile Method requirement engineering.ppt
Agile Method requirement engineering.pptubaidullah75790
 
traceabilty transport layer is liye .ppt
traceabilty transport layer is liye .ppttraceabilty transport layer is liye .ppt
traceabilty transport layer is liye .pptubaidullah75790
 
vu-re-lecture-45 requirement engineering.ppt
vu-re-lecture-45 requirement engineering.pptvu-re-lecture-45 requirement engineering.ppt
vu-re-lecture-45 requirement engineering.pptubaidullah75790
 
SRS for banking system requirement s.ppt
SRS for banking system requirement s.pptSRS for banking system requirement s.ppt
SRS for banking system requirement s.pptubaidullah75790
 
SRS 2 requiremenr engineering in computer.ppt
SRS 2 requiremenr engineering in computer.pptSRS 2 requiremenr engineering in computer.ppt
SRS 2 requiremenr engineering in computer.pptubaidullah75790
 
Requirments management traceability.ppt
Requirments  management traceability.pptRequirments  management traceability.ppt
Requirments management traceability.pptubaidullah75790
 
SRS 1 software requirement specificatio.ppt
SRS 1 software requirement specificatio.pptSRS 1 software requirement specificatio.ppt
SRS 1 software requirement specificatio.pptubaidullah75790
 
vu-re-lecture-10 requirement engineering.ppt
vu-re-lecture-10 requirement engineering.pptvu-re-lecture-10 requirement engineering.ppt
vu-re-lecture-10 requirement engineering.pptubaidullah75790
 
vu-re-lecture-09 engineering requiremen.ppt
vu-re-lecture-09 engineering requiremen.pptvu-re-lecture-09 engineering requiremen.ppt
vu-re-lecture-09 engineering requiremen.pptubaidullah75790
 
vu-re-lecture-08 requirement engineer.ppt
vu-re-lecture-08 requirement engineer.pptvu-re-lecture-08 requirement engineer.ppt
vu-re-lecture-08 requirement engineer.pptubaidullah75790
 
vu-re-lecture-06 requirement engineer.ppt
vu-re-lecture-06 requirement engineer.pptvu-re-lecture-06 requirement engineer.ppt
vu-re-lecture-06 requirement engineer.pptubaidullah75790
 
vu-re-lecture-05 requirement engineering.ppt
vu-re-lecture-05 requirement engineering.pptvu-re-lecture-05 requirement engineering.ppt
vu-re-lecture-05 requirement engineering.pptubaidullah75790
 
vu-re-lecture-04 software engineering.ppt
vu-re-lecture-04 software engineering.pptvu-re-lecture-04 software engineering.ppt
vu-re-lecture-04 software engineering.pptubaidullah75790
 
vu-re-lecture-03 requirement engineering.ppt
vu-re-lecture-03 requirement engineering.pptvu-re-lecture-03 requirement engineering.ppt
vu-re-lecture-03 requirement engineering.pptubaidullah75790
 
vu-re-lecture-02 requirements engineering.ppt
vu-re-lecture-02 requirements engineering.pptvu-re-lecture-02 requirements engineering.ppt
vu-re-lecture-02 requirements engineering.pptubaidullah75790
 
vu-re-lecture-01 software engineering.ppt
vu-re-lecture-01 software engineering.pptvu-re-lecture-01 software engineering.ppt
vu-re-lecture-01 software engineering.pptubaidullah75790
 
vu-re-lecture software requirement-25.ppt
vu-re-lecture software requirement-25.pptvu-re-lecture software requirement-25.ppt
vu-re-lecture software requirement-25.pptubaidullah75790
 

Mehr von ubaidullah75790 (20)

vu-re-lecture-33 requirement engineering.ppt
vu-re-lecture-33 requirement engineering.pptvu-re-lecture-33 requirement engineering.ppt
vu-re-lecture-33 requirement engineering.ppt
 
Requirement management traceability.ppt
Requirement management  traceability.pptRequirement management  traceability.ppt
Requirement management traceability.ppt
 
SRS for banking system requirement engineer.ppt
SRS for banking system requirement engineer.pptSRS for banking system requirement engineer.ppt
SRS for banking system requirement engineer.ppt
 
Agile Method requirement engineering.ppt
Agile Method requirement engineering.pptAgile Method requirement engineering.ppt
Agile Method requirement engineering.ppt
 
traceabilty transport layer is liye .ppt
traceabilty transport layer is liye .ppttraceabilty transport layer is liye .ppt
traceabilty transport layer is liye .ppt
 
vu-re-lecture-45 requirement engineering.ppt
vu-re-lecture-45 requirement engineering.pptvu-re-lecture-45 requirement engineering.ppt
vu-re-lecture-45 requirement engineering.ppt
 
SRS for banking system requirement s.ppt
SRS for banking system requirement s.pptSRS for banking system requirement s.ppt
SRS for banking system requirement s.ppt
 
SRS 2 requiremenr engineering in computer.ppt
SRS 2 requiremenr engineering in computer.pptSRS 2 requiremenr engineering in computer.ppt
SRS 2 requiremenr engineering in computer.ppt
 
Requirments management traceability.ppt
Requirments  management traceability.pptRequirments  management traceability.ppt
Requirments management traceability.ppt
 
SRS 1 software requirement specificatio.ppt
SRS 1 software requirement specificatio.pptSRS 1 software requirement specificatio.ppt
SRS 1 software requirement specificatio.ppt
 
vu-re-lecture-10 requirement engineering.ppt
vu-re-lecture-10 requirement engineering.pptvu-re-lecture-10 requirement engineering.ppt
vu-re-lecture-10 requirement engineering.ppt
 
vu-re-lecture-09 engineering requiremen.ppt
vu-re-lecture-09 engineering requiremen.pptvu-re-lecture-09 engineering requiremen.ppt
vu-re-lecture-09 engineering requiremen.ppt
 
vu-re-lecture-08 requirement engineer.ppt
vu-re-lecture-08 requirement engineer.pptvu-re-lecture-08 requirement engineer.ppt
vu-re-lecture-08 requirement engineer.ppt
 
vu-re-lecture-06 requirement engineer.ppt
vu-re-lecture-06 requirement engineer.pptvu-re-lecture-06 requirement engineer.ppt
vu-re-lecture-06 requirement engineer.ppt
 
vu-re-lecture-05 requirement engineering.ppt
vu-re-lecture-05 requirement engineering.pptvu-re-lecture-05 requirement engineering.ppt
vu-re-lecture-05 requirement engineering.ppt
 
vu-re-lecture-04 software engineering.ppt
vu-re-lecture-04 software engineering.pptvu-re-lecture-04 software engineering.ppt
vu-re-lecture-04 software engineering.ppt
 
vu-re-lecture-03 requirement engineering.ppt
vu-re-lecture-03 requirement engineering.pptvu-re-lecture-03 requirement engineering.ppt
vu-re-lecture-03 requirement engineering.ppt
 
vu-re-lecture-02 requirements engineering.ppt
vu-re-lecture-02 requirements engineering.pptvu-re-lecture-02 requirements engineering.ppt
vu-re-lecture-02 requirements engineering.ppt
 
vu-re-lecture-01 software engineering.ppt
vu-re-lecture-01 software engineering.pptvu-re-lecture-01 software engineering.ppt
vu-re-lecture-01 software engineering.ppt
 
vu-re-lecture software requirement-25.ppt
vu-re-lecture software requirement-25.pptvu-re-lecture software requirement-25.ppt
vu-re-lecture software requirement-25.ppt
 

Kürzlich hochgeladen

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
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
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
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.
 
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
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
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
 
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
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 

Kürzlich hochgeladen (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
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
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
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...
 
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
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
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
 
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
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 

ERD.ppt

  • 1. 1 Entity Relationship Modeling Objectives: • To illustrate how relationships between entities are defined and refined. • To know how relationships are incorporated into the database design process. • To describe how ERD components affect database design and implementation.
  • 2. 2 1.0 What is Conceptual Database Design? • Process of describing the data, relationships between the data, relationships between the data, and the constraints on the data. • After analysis - Gather all the essential data required and understand how the data are related • The focus is on the data, rather than on the processes. • The output of the conceptual database design is a Conceptual Data Model ( + Data Dictionary)
  • 3. 3 2.0 Gathering Information for Conceptual Data Modeling • Two perspectives – Top-down • Data model is derived from an intimate understanding of the business. – Bottom-up • Data model is derived by reviewing specifications and business documents.
  • 4. 4 2.0 Entity-Relationship (ER) Modeling. • ER Modeling is a top-down approach to database design. • Entity Relationship (ER) Diagram – A detailed, logical representation of the entities, associations and data elements for an organization or business • Notation uses three main constructs – Data entities – Relationships – Attributes Chen Model & Crow’s Foot Model
  • 5. Person, place, object, event or concept about which data is to be maintained named property or characteristic of an entity Association between the instances of one or more entity types Represents a set or collection of objects in the real world that share the same properties Chen Notation EntityName Verb Phrase AttributeName
  • 6. Crow’s Foot Notation EntityName Entity Attribute EntityName List of Attributes Relationship Verb phrase Acceptable
  • 7. 7 2.1 Entities • Examples of entities: – Person: EMPLOYEE, STUDENT, PATIENT – Place: STORE, WAREHOUSE – Object: MACHINE, PRODUCT, CAR – Event: SALE,REGISTRATION, RENEWAL – Concept: ACCOUNT, COURSE • Guidelines for naming and defining entity types: – An entity type name is a singular noun – An entity type should be descriptive and specific – An entity name should be concise – Event entity types should be named for the result of the event, not the activity or process of the event.
  • 8. 8 2.2 Attributes • Example of entity types and associated attributes: STUDENT: Student_ID, Student_Name, Home_Address, Phone_Number, Major • Guidelines for naming attributes: – An attribute name is a noun. – An attribute name should be unique – To make an attribute name unique and clear, each attribute name should follow a standard format – Similar attributes of different entity types should use similar but distinguishing names.
  • 9. 9 2.2.1 Identifier Attributes • Candidate key – Attribute (or combination of attributes) that uniquely identifies each instance of an entity type – Some entities may have more than one candidate key • Ex: A candidate key for EMPLOYEE is Employee_ID, a second is the combination of Employee_Name and Address. • If there is more than one candidate key, need to make a choice. • Identifier – A candidate key that has been selected as the unique identifying characteristic for an entity type
  • 10. 10 2.2.2 Referential Attributes Name IdNum DeptID Email Ali 105 LG ali@a.com Mary 106 IT mary@a.com John 107 ENG john@a.com Lim 108 IT lim@a.com Instance of Lecturer. Referential attribute: Ties the lecturer entity to another entity that is department. • Make Reference to another instance in another table
  • 12. 12 2.3 Relationships  Associations between instances of one or more entity types that is of interest  Given a name that describes its function. • relationship name is an active or a passive verb. Author Book Relationship name: writes An author writes one or more books A book can be written by one or more authors.
  • 13. 13 2.3.1 Degree of Relationships • Degree: number of entity types that participate in a relationship • Three cases – Unary: between two instances of one entity type – Binary: between the instances of two entity types – Ternary: among the instances of three entity types
  • 14. 14 2.4 Cardinality and Connectivity • Relationships can be classified as either • one – to – one • one – to – many • many – to –many • Cardinality : minimum and maximum number of instances of Entity B that can (or must be) associated with each instance of entity A. Connectivity
  • 15. 15 2.4 Cardinality and Connectivity Professor Class teaches A professor teaches class OR A class is taught by professor How Many?? Professor Class teaches
  • 16. 16 2.4 Cardinality and Connectivity Professor Class teaches Professor Class teaches 1 M Connectivity Connectivity (1,1) (1,1) (1,4) (1,4) Cardinality Cardinality
  • 17. 17 2.4.1 Connectivity • Chen Model – 1 to represent one. – M to represent many • Crow’s Foot many One One or many 1 M Mandatory one , means (1,1) Optional? – we’ll see after this
  • 18. 18 2.5 Binary Relationships • 1:M relationship – Relational modeling ideal – Should be the norm in any relational database design The 1: M relationship between PAINTER and PAINTING
  • 19. The Implemented 1:M relationship between PAINTER and PAINTING
  • 20. 20 2.5 Binary Relationships • 1:1 relationship – Should be rare in any relational database design – A single entity instance in one entity class is related to a single entity instance in another entity class – Could indicate that two entities actually belong in the same table
  • 21. The 1:1 Relationship Between PROFESSOR and DEPARTMENT
  • 23. 23 2.5 Binary Relationships • M:N relationships – Must be avoided because they lead to data redundancies. – Can be implemented by breaking it up to produce a set of 1:M relationships – Can avoid problems inherent to M:N relationship by creating a composite entity or bridge entity • This will be used to link the tables that were originally related in a M:N relationship • The composite entity structure includes-as foreign keys-at least the primary keys of the tables that are to be linked.
  • 24. The M:N Relationship Between STUDENT and CLASS This CANNOT be implemented as shown next….. Bowser Smithson Accounting 1 (ACCT-211) Intro to Microcomputing (CIS-220) Intro to Statistics (QM-261)
  • 25. The tables have many redundancies!! + CLASS_CODE CLASS_CODE + STU_NUM
  • 26. Changing the M:N relationship to TWO 1:M relationships
  • 27. Converting the M:N relationship into TWO 1:M relationships Foreign keys reference the primary keys in the other tables of which it has a relationship with The database designer has 2 main options to define a composite table’s primary key: either use the combination of those foreign keys or create a new primary key.
  • 28. 28 2.6 Mandatory vs. Optional Cardinalities • Specifies whether an instance must exist or can be absent in the relationship Lecturer Class handles A Lecturer may handle zero or many classes. A class is handled by one and only one Lecturer. Optional Mandatory (0,N) (1,1) Lecturer Class (0,N) (1,1) handles 1 M
  • 29. 29 2.7 How to Evaluate a Data Model? • A good data model has the following: – Accuracy and completeness – Non redundancy – Enforcement of business rules – Data Reusability – Stability and Flexibility – Communication Effectiveness – Simplicity
  • 30. 30 A Common Mistake Modeling the business processes or functions instead of the data. What data we want to keep?? We are interested in modeling the data, NOT the processes or functions that use or generate those data.
  • 31. 31 Example: Member Books Searches M N Is this part of the data requirement? Are we interested to know the books searched by the members? If answer is NO, then DO NOT include that as a relationship. Use other appropriate diagramming techniques to capture the business processes such as Data Flow Diagram. Do not mix up the use of ER Modeling with DFD.