SlideShare a Scribd company logo
1 of 32
ERD :: 19 / 1 / 07 1
Entity Relationship ModelingEntity 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.
ERD :: 19 / 1 / 07 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)
ERD :: 19 / 1 / 07 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.
ERD :: 19 / 1 / 07 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
EntityEntity AttributeAttribute
EntityName
List of
Attributes
RelationshipRelationship
Verb phrase
Acceptable
ERD :: 19 / 1 / 07 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.
ERD :: 19 / 1 / 07 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.
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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
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
ERD :: 19 / 1 / 07 11
Example
Staff
StaffID
Name Gender
IC
Staff
StaffID
Name
Gender
IC
PK
ERD :: 19 / 1 / 07 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.
 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.
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 15
2.4 Cardinality and Connectivity
Professor Class
teaches
A professor teaches class OR
A class is taught by professor
How Many??How Many??
Professor Classteaches
ERD :: 19 / 1 / 07 16
2.4 Cardinality and Connectivity
Professor Class
teaches
Professor Classteaches
1 M
Connectivity
Connectivity
(1,1)
(1,1)
(1,4)
(1,4)
Cardinality
Cardinality
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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.
ERD :: 19 / 1 / 07 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.
OptionalOptionalMandatoryMandatory
(0,N)(1,1)
Lecturer Class
(0,N) (1,1)
handles
1 M
ERD :: 19 / 1 / 07 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
ERD :: 19 / 1 / 07 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.
ERD :: 19 / 1 / 07 31
Example:
Member BooksSearches
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.
ERD :: 19 / 1 / 07 32
~The END~
Q & A

More Related Content

What's hot

Web based tourism system
Web based tourism system Web based tourism system
Web based tourism system Shivangi Singh
 
.Net and Windows Application Project on Hotel Management
.Net  and Windows Application Project on Hotel Management.Net  and Windows Application Project on Hotel Management
.Net and Windows Application Project on Hotel ManagementMujeeb Rehman
 
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế website cho giảng viên Việ...
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế  website cho giảng viên Việ...Ứng dụng ngôn ngữ UML trong phân tích và thiết kế  website cho giảng viên Việ...
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế website cho giảng viên Việ...Nguyễn Anh
 
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAY
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAYĐề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAY
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAYViết thuê trọn gói ZALO 0934573149
 
Tìm hiểu các kỹ thuật kiểm thử phần mềm ứng dụng trong lập trình Java.
Tìm hiểu các kỹ thuật kiểm thử phần mềm  ứng dụng trong lập trình Java.Tìm hiểu các kỹ thuật kiểm thử phần mềm  ứng dụng trong lập trình Java.
Tìm hiểu các kỹ thuật kiểm thử phần mềm ứng dụng trong lập trình Java.Nguyễn Anh
 
Railway Reservation System - Requirement Engineering
Railway Reservation System - Requirement EngineeringRailway Reservation System - Requirement Engineering
Railway Reservation System - Requirement EngineeringDanish Javed
 
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTION
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTIONBáo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTION
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTIONnataliej4
 
Aspect Level Sentiment Analysis for Arabic Language
Aspect Level Sentiment Analysis for Arabic LanguageAspect Level Sentiment Analysis for Arabic Language
Aspect Level Sentiment Analysis for Arabic LanguageMido Razaz
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Hoa Le
 
Lập trình chương trình chat room sử dụng giao thức tcp socket
Lập trình chương trình chat room sử dụng giao thức tcp socketLập trình chương trình chat room sử dụng giao thức tcp socket
Lập trình chương trình chat room sử dụng giao thức tcp socketjackjohn45
 
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụng
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụngsuricata giới thiệu, cách sử dụng, hoàn cảnh sử dụng
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụngNgcBoNguyn3
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7koolkampus
 
1. python for data science
1. python for data science1. python for data science
1. python for data scienceDr Nisha Arora
 
Online course management system
Online course management systemOnline course management system
Online course management systempaparaon
 
Bao cao wesite bán giày.docx
Bao cao wesite bán giày.docxBao cao wesite bán giày.docx
Bao cao wesite bán giày.docxssuser11005a
 
Báo cáo mô hình quản lý khách sạn
Báo cáo mô hình quản lý khách sạnBáo cáo mô hình quản lý khách sạn
Báo cáo mô hình quản lý khách sạnbaran19901990
 

What's hot (20)

Web based tourism system
Web based tourism system Web based tourism system
Web based tourism system
 
.Net and Windows Application Project on Hotel Management
.Net  and Windows Application Project on Hotel Management.Net  and Windows Application Project on Hotel Management
.Net and Windows Application Project on Hotel Management
 
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế website cho giảng viên Việ...
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế  website cho giảng viên Việ...Ứng dụng ngôn ngữ UML trong phân tích và thiết kế  website cho giảng viên Việ...
Ứng dụng ngôn ngữ UML trong phân tích và thiết kế website cho giảng viên Việ...
 
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAY
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAYĐề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAY
Đề tài: Phân tích và thiết kế phần mềm quản lý khách sạn, HAY
 
Tìm hiểu các kỹ thuật kiểm thử phần mềm ứng dụng trong lập trình Java.
Tìm hiểu các kỹ thuật kiểm thử phần mềm  ứng dụng trong lập trình Java.Tìm hiểu các kỹ thuật kiểm thử phần mềm  ứng dụng trong lập trình Java.
Tìm hiểu các kỹ thuật kiểm thử phần mềm ứng dụng trong lập trình Java.
 
Railway Reservation System - Requirement Engineering
Railway Reservation System - Requirement EngineeringRailway Reservation System - Requirement Engineering
Railway Reservation System - Requirement Engineering
 
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTION
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTIONBáo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTION
Báo cáo ATTT CÁC DẠNG TẤN CÔNG SQL INJECTION
 
Aspect Level Sentiment Analysis for Arabic Language
Aspect Level Sentiment Analysis for Arabic LanguageAspect Level Sentiment Analysis for Arabic Language
Aspect Level Sentiment Analysis for Arabic Language
 
Đề tài: Quản lý thu chi tại trung tâm đào tạo ngoại ngữ, HOT
Đề tài: Quản lý thu chi tại trung tâm đào tạo ngoại ngữ, HOTĐề tài: Quản lý thu chi tại trung tâm đào tạo ngoại ngữ, HOT
Đề tài: Quản lý thu chi tại trung tâm đào tạo ngoại ngữ, HOT
 
Bai giang he qtdl
Bai giang he qtdlBai giang he qtdl
Bai giang he qtdl
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL
 
Lập trình chương trình chat room sử dụng giao thức tcp socket
Lập trình chương trình chat room sử dụng giao thức tcp socketLập trình chương trình chat room sử dụng giao thức tcp socket
Lập trình chương trình chat room sử dụng giao thức tcp socket
 
Chapter 3 requirements
Chapter 3 requirementsChapter 3 requirements
Chapter 3 requirements
 
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụng
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụngsuricata giới thiệu, cách sử dụng, hoàn cảnh sử dụng
suricata giới thiệu, cách sử dụng, hoàn cảnh sử dụng
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7
 
1. python for data science
1. python for data science1. python for data science
1. python for data science
 
Đề tài: Nhận dạng, phân loại, xử lý ảnh biển số xe bằng phần mềm
Đề tài: Nhận dạng, phân loại, xử lý ảnh biển số xe bằng phần mềmĐề tài: Nhận dạng, phân loại, xử lý ảnh biển số xe bằng phần mềm
Đề tài: Nhận dạng, phân loại, xử lý ảnh biển số xe bằng phần mềm
 
Online course management system
Online course management systemOnline course management system
Online course management system
 
Bao cao wesite bán giày.docx
Bao cao wesite bán giày.docxBao cao wesite bán giày.docx
Bao cao wesite bán giày.docx
 
Báo cáo mô hình quản lý khách sạn
Báo cáo mô hình quản lý khách sạnBáo cáo mô hình quản lý khách sạn
Báo cáo mô hình quản lý khách sạn
 

Viewers also liked

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Presentation database about ERD
Presentation database about ERDPresentation database about ERD
Presentation database about ERDElis Ervina
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship modelJane Garay
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramSiti Ismail
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDtorp42
 
How to read a data model
How to read a data modelHow to read a data model
How to read a data modelsanksh
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentationSopov Chan
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
System development life cycle (sdlc)
System development life cycle (sdlc)System development life cycle (sdlc)
System development life cycle (sdlc)Mukund Trivedi
 

Viewers also liked (14)

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Presentation database about ERD
Presentation database about ERDPresentation database about ERD
Presentation database about ERD
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship model
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Erd
ErdErd
Erd
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERD
 
How to read a data model
How to read a data modelHow to read a data model
How to read a data model
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentation
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
System development life cycle (sdlc)
System development life cycle (sdlc)System development life cycle (sdlc)
System development life cycle (sdlc)
 

Similar to Erd1

Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Edwin Ayernor
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptIRWANBINISMAILKPMGur1
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1SIMONTHOMAS S
 
Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And ErAshwani Kumar Ramani
 
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
 
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
 
Database management systems 3 - Data Modelling
Database management systems 3 - Data ModellingDatabase management systems 3 - Data Modelling
Database management systems 3 - Data ModellingNickkisha Farrell
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptxkingVox
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data ModelBishrul Haq
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I pkaviya
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)PadmapriyaA6
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide sharefanta teferi
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and DevelopmentEr. Nawaraj Bhandari
 

Similar to Erd1 (20)

Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
 
ERD.ppt
ERD.pptERD.ppt
ERD.ppt
 
ERD.ppt
ERD.pptERD.ppt
ERD.ppt
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1
 
Db lec 01
Db lec 01Db lec 01
Db lec 01
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And Er
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Database part3-
Database part3-Database part3-
Database part3-
 
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
 
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
 
Database management systems 3 - Data Modelling
Database management systems 3 - Data ModellingDatabase management systems 3 - Data Modelling
Database management systems 3 - Data Modelling
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
 
Sq lite module4
Sq lite module4Sq lite module4
Sq lite module4
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
Introduction of Database Design and Development
Introduction of Database Design and DevelopmentIntroduction of Database Design and Development
Introduction of Database Design and Development
 

Recently uploaded

A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 

Recently uploaded (20)

A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 

Erd1

  • 1. ERD :: 19 / 1 / 07 1 Entity Relationship ModelingEntity 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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 EntityEntity AttributeAttribute EntityName List of Attributes RelationshipRelationship Verb phrase Acceptable
  • 7. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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 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. ERD :: 19 / 1 / 07 11 Example Staff StaffID Name Gender IC Staff StaffID Name Gender IC PK
  • 12. ERD :: 19 / 1 / 07 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.  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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 15 2.4 Cardinality and Connectivity Professor Class teaches A professor teaches class OR A class is taught by professor How Many??How Many?? Professor Classteaches
  • 16. ERD :: 19 / 1 / 07 16 2.4 Cardinality and Connectivity Professor Class teaches Professor Classteaches 1 M Connectivity Connectivity (1,1) (1,1) (1,4) (1,4) Cardinality Cardinality
  • 17. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. OptionalOptionalMandatoryMandatory (0,N)(1,1) Lecturer Class (0,N) (1,1) handles 1 M
  • 29. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 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. ERD :: 19 / 1 / 07 31 Example: Member BooksSearches 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.
  • 32. ERD :: 19 / 1 / 07 32 ~The END~ Q & A