SlideShare a Scribd company logo
II BCA- IV SEMESTER
BCA405 – System Analysis
& Design
Chapter 9- Conceptual
Data Modeling Using
ER Models
By:
Shailaja Kumary, Asst. Professor
Dept. of Computer Science
Canara College Mangalore
Data Modeling Using E-R Models 1
Data Model
Data Modeling Using E-R Models 2
 Data modeling is the most important task in database
development


completeness – correctness – performance of database
depends on correct data model
…shows up how data are structured at
Conceptual, Logical and Physical level
 More formally, it is a collection of concepts that can be
used to describe “Database Structure”
- Elmasri/Navathe
 “Database Structure”, we mean here -
data types, relationships, and constraints
Why Data Modeling
Data Modeling Using E-R Models 3
 It is essential step of database design, not optional
 If no, it is like making a house without a plan!
 Sometimes, in smaller applications, it may not be
explicitly done or documented still it is done
Phases of Database Design
Data Modeling Using E-R Models 4

 Requirement Analysis – Understand the business
needs and Data Components within.
Conceptual Design
 Develop Higher/Conceptual Data Model – easily understandable by End-
Users and Managers….. what this talk is about
 Logical Design
 Develop Logical/Implementation Schema in one of the implementation
technologies like Relational, Object Relational, OO. Historically
Hierarchical/Network Models
 Physical Design
 Develop Internal Schema – how files are stored on disk –
deal with file organization, indexes, clustering etc.
Conceptual Model
Data Modeling Using E-R Models 5




 Correct and Formal representation of data items
are the objectives here
Intuitive and Simple to understand – end users
and managers can easily understand
Centers on “what data items and business rules
it contains” not on how they are stored or
organized in application (or structured in a
DBMS logically or physically)
ER Diagrams and UML class diagrams are
popular Conceptual models
Implementation neutral
E-R Diagram (Model ? )
Data Modeling Using E-R Models 6
 As said, it is a popular high level Conceptual
Data Model
 ER Diagram are simple consists of just -



Entities – their attributes
Relationship between entities
Constraints on Entities and Relationship
 Let us understand what these terms mean here?
How we see data around us-
8 … …… ………..
… …… ………..
Data Modeling Using E-R Models 7
List of Students IIyr BTech(CS)
Intake
BCS BTech(Computer Science) 40 …
BIT BTech(Information Technology) 40 …
….. ……. ….. …
….. …… …… …
StudID Name DOB Fasther’s
Name
Address …………..
060101 Aditi 12-10-88 … …… ………..
060102 Anurag 10-02-89 … …… ………..
060103 Arpit 11-07-8
List of Programs Offered by CSE D
….. …… ……
ProgID ProgName
epartment
Data Modeling Using E-R Models 7
How do we describe this data
Data Modeling Using E-R Models 8
 Careful watch reveals that we have two type of “entity
sets” here-


Students and Programs
Let us call all students together entity set, and Program
together another entity set
 Each Student entity has certain properties (or attributes)
like Name, DOB, Fathers Name etc., and their values
drawn from a predefined “value set”,
 and similarly each program has certain attributes, and
their values
How do we describe this data
Data Modeling Using E-R Models 9
 If we attempt to describe student entity, typically it can
be like this-




Name of Entity: Student
Attributes: StudID, Name, DOB, FathersName, ..
Each Attribute derives value from a value set (domain)
StudID uniquely identifies a student entity in the set
 This is description of Student entity, and we call it
“Entity Type”
 Similarly we describe Program Entity Type
ERD notation for the Entity types
Notations used here are,
originally suggested by
Dr Peter Chen in ’76,
known as Chen’s notation
Data Modeling Using E-R Models 10
Entities and Attributes
Data Modeling Using E-R Models 11



 Entity is the basic object in ER model. It is
thing which exists
Each entity has attributes- properties that
describe the entity, for example as we have
seen-
Entity: Student
Attributes: StudID, Name, DOB, Father’s
Name, Address,
Entity: Program
Attributes: ProgID, ProgName, Intake
Entities and Attributes
Data Modeling Using E-R Models 12
 Attributes could be

 Atomic – can not be meaningfully decomposed:
Example DOB can not be decomposed in
Day/Month/Year – DOB is atomic data
Student-Name may or may not be atomic




 If FirstName, LasteName have individual meaning
Key Attributes
Composite: Example Address (Street, City, PIN)
Single valued and multi-valued
Stored and Derived attributes
Entities and Attributes in ERD
Composite
Attribute
Multi-value
Attribute
Key
Attribute
Data Modeling Using E-R Models 13
Key attribute Uniquely Identifies an Entity in Entity Set
Entities and Attributes
Derived
Attribute
Data Modeling Using E-R Models 14
Entity Type



Casually, very often term “entity” is used for “Entity Type”.
An Entity Type describes schema or intention for a set of
entities sharing the same structure.
In OO terminology, an entity type is similar to a class, and an
entity is similar to an instance
Definition (Elmasri/Navathe):
Entity Type defines a collection (or set)
of entities that have the same attributes.
Each Entity Type in the database
is described by its name and attributes
Data Modeling Using E-R Models 15
Entity Set

 The collection of entities of a particular entity type are
grouped into an entity set, is also called extension of entity
type.
The entity set usually referred with the same name as of
Entity Type
060103 Arpit 11-07-88 … …… ………..
….. …… …… … …… ………..
Definition (El
The collection
in the databas
Data Modeling Using E-R Models 16
StudID Name DOB Fasther’s
Name
Address …………..
060101 Aditi 12-10-88 … …… ………..
060102 Anurag 10-02-89 … …… ………..
masri/Navathe):
of all entities of a particular type
e at any point of time is called an entity set.
Key Attributes

 It is Attribute or set of Attributes, called Key Attribute
which are used to uniquely identify the entity in the set
An important constraint on entities of an entity type is
the key constraint or uniqueness constraint.
Key
Attribute
Data Modeling Using E-R Models 17
StudID Name DOB Address
060101 Aditi 12-10-88 ……
060102 Anurag 10-02-89 ……
060103 Arpit 11-07-88 ……
….. …… …… ……
Value Sets (Domains) of Attributes
Data Modeling Using E-R Models 18

 Each simple attribute of an entity type is
associated with a value set (or a domain of
values), which specifies the set of values that
may be assigned to that attribute for each
individual entity
Also known as domain constraint on an
attribute
Relationship Type, Instance, and Set
Data Modeling Using E-R Models 19
 Let us look at following facts –






Aditi studies in BIT
Amit studies in BCS
Arpit studies in BIT
Varun studies in BEE
Radhika studies in BIT
Shyam studies in BCS



This shows Relationship between Student and Program
entities (entity types to be precise) … let us give a
name to it “Studies” – obvious choice
Relationship also has type and set, here studies is
Relationship Type,
Each of above statement is instance of the type, and
All together form relationship set
Relationship Instance Diagram
Relationship
Set
Data Modeling Using E-R Models 20
Simple ER Diagram: Student-Program
Relationship
Data Modeling Using E-R Models 21
Relationships can also have attributes
Data Modeling Using E-R Models 22

 In our previous example, suppose we also want to have
study duration of a student in a program, then
Let us say, we have attributes year_from, and year_to
Cardinality Constraints for
Binary Relationships
Data Modeling Using E-R Models 23

 Binary relationship, is the one in which two
entity types participate.
Based on the number of relationships instances
in which an entity can participate, relationship
types can be one following-



One to One (1:1)
One to Many (1:N)
Many to Many (M:N)
 Example:
 Customer – Bank Account as 1:1, 1:N, M:N
One to One (1:1)
 One Customer has one account and one account is
owned by one customer
Data Modeling Using E-R Models 24
One to Many (1:N)
Data Modeling Using E-R Models 25
 One Customer has many accounts, and one account is
owned by one customer
Many to Many (M:N)
 One Customer has many accounts, and one account is
owned by multiple customers jointly
Data Modeling Using E-R Models 26
Cardinality Constraints for
Binary Relationships
Data Modeling Using E-R Models 27
 Every Relationship Type has to be specified to be one
these – a constraint on relationship type
 Cardinality Constraints are also called Cardinality
Ratio (Elmasri/Navathe), though not ratio in precise
terms. Probably, because it written in ratio format
(1:N)!
 Some authors also call it Mapping Cardinality (Korth)
 Cardinality Constraint appears to be better name, as it
is an constraint on the cardinality of relationship
instances into which a entity can participate at most.
Some relationship examples?
Data Modeling Using E-R Models 28
 Identify and determine cardinality ratio?





Student and Mentor
Bill and Item
Course and Professor
Course and Text Book
Vehicle and Owner
Participation can be
Total (mandatory) or Partial (optional)




In our Customer-Account example-
If customer record can exist in database without having
associated with an account – then participation of
customer is partial otherwise total.
Can Customer exist without associating with a
account? Probably Yes.
Can account exist without associating with a customer?
Probably No. Partial
Participation
Total
Participation
Data Modeling Using E-R Models 29
Data Modeling Using E-R Models 30
Student-Program “schema”

 Participation of Student in Studies relationship is
mandatory – student has to study in a program.
Participation of a Program can be optional – we may
not take admission in a program.
Total
Participatio
n
Partial
ParticipationData Modeling Using E-R Models 3
0
Data Modeling Using E-R Models
Student-Program schema
Here we see that One student can participate only once—
this means we are modeling the business rule that One Student can study in one programonly
And, One Program can have many students. That is Right
We can easily note that Participation of student is Mandatory
While it is optional for Program. 31
This diagram lets us ensure that we are modeling right business rule in the database
Business rules are modeled as constraints in data models
Cardinality and Participation are important constraints in Data Model
Data Modeling Using E-R Models 3
1
Some relationship examples?
Data Modeling Using E-R Models 32
 Identify and determine cardinality ratio?





Student and Mentor
Bill and Item
Course and Professor
Course and Text Book
Vehicle and Owner
Exercises
Data Modeling Using E-R Models 33
 Case: Simple Trading Company
 Case: My Books Database
Understand Cardinality Ratio
Data Modeling Using E-R Models 34
 Two of looking at-
 To how many entities an entity can be associated
with other side entity type
 How many times an entity participates into the
relationship
Cardinality Constraint (Ratio)
 One to One: Any entity (from any side)
is associated with at most one entity
in other side
 One to Many: one side entity can
be associated with multiple
entities from other side
 Many to Many: any entity from
any side can be associated with
multiple entities from other side
1 N
Data Modeling Using E-R Models 35
Cardinality Constraint (Ratio)
– another way of looking at
 One to One: any entity (from any side)
can participate at most once
in the relationship
 One to Many: one side entity
participates multiple times
in the relationship
 Many to Many: any entity from
any side participates multiple
times in the relationship
1 N
Data Modeling Using E-R Models 36
Structural Constraints
Data Modeling Using E-R Models 37
 Cardinality ratio and participation constraints in
together are also called structural constraints.
 Second approach of looking at cardinality
constraints evolves another way of depicting
structural constraints in ER Diagram
ata Modeling Using E-R Models
Another way of showing structural
constraint
 Min possibility a customer (entity) can participate in holds
relationship is 0, and Max possibility it can participate in
holds relationship is N, and same way for Account entity
type it is one and only one
(0,n)
D
(1,1)
Data Modeling Using E-R Models 3
8
ata Modeling Using E-R Models
Another way of showing structural
constraint – Many to Many
 Min possibility an Account (entity) can participate in
holds relationship is 1, and Max possibility it can can
participate in holds relationship is N
(0,n) (1,N)
DData Modeling Using E-R Models 3
9
Structural constraints
Data Modeling Using E-R Models 40
 Note that this notation takes care of
participation constraints as well.
 Having min participation zero is partial
participation while, and having > 0 is total
participation
Recursive Relationship


Entity having relationship with itself
There can be many situations like this




Employee supervises another employee
One citizen is spouse of another citizen
One course has pre-requisite of another course
One category is parent of another category
Data Modeling Using E-R Models 41
Recursive Relationship
r1: e5 is supervisor ofe1
r2: e1 is supervisor ofe2
r3: e1 is supervisor ofe2
r4: e5 is supervisor ofe4
r5: e4 is supervisor ofe6
r6: e4 is supervisor ofe7
e1
e2
e3
e4
e5
e6
e7
r1
Data Modeling Using E-R Models 42
r2
r3
r4
r5
r6
Roles: Supervisor (Green), Subordinate (Red)
Employee Supervises
What about Cardinality and participation
constraints in Supervises relationship..
Data Modeling Using E-R Models 43
 ?
Weak Entity Types
Data Modeling Using E-R Models 44



 Entity that do not have key attributes of their own are
called weak entity types
These are attached to some regular/strong entity type,
we call that entity as identifying or owner entity type,
and we call the relationship between weak entity type
and its owner entity type, identifying relationship.
A weak entity type always has total participation in its
identifying relationship.
Examples:


Experience History of an Employee
Dependents of an Employee
Weak Entity Types
Identifying
Relationship
Weak
Entity
Owner
Entity
Data Modeling Using E-R Models 45

Data Modeling Using E-R Models 46
In some cases, database designer may choose to
express weak entity as multi-value composite
attribute of the owner entity type
 However, this approach could only be possible
if week entity does not participate in any other
relationship than identifying relationships.
ER Creating Guidelines
Data Modeling Using E-R Models 47



 As a thumb rule Nouns and Objects are
candidate for Entities and Verbs for
relationships in a problem description.
Below are some rules suggested in
[Entity-Relationship Modeling,A Practical how-to-guide, Yeol Song and
Kristin Froehlich, IEEE Potentials, Dec-94/Jan-95, pg#29-34]
3. Every entity type should be important in its
own right within the problem domain
Address can not be an entity
City, can be Yes or No
ER Creating Guidelines
Data Modeling Using E-R Models 48



1. IF an object type (noun) has only one property
to store THEN it is an attribute of another
entity type ELSE it is an entity type-
Suppose naukari.com wants to store skills of
job seekers, can it be attribute or entity?
Can be Yes or No
If we want to store more meaning to skills, For
example “C++”: which platform, which
functional Area etc., then it becomes entity,
otherwise just attribute
ER Creating Guidelines
Data Modeling Using E-R Models 49
1. IF an object type has only one data instance THEN do
not model as an entity type – example Director,
DAIICT
2. IF a relationship needs to have a unique identifier
THEN model it as an entity type


Consider “products are billed to customers”, appear like
relationship, but bills are numbered, and uniquely identified,
candidate for entity type.
Similarly Pays, Orders look like relationships but are
possibly entities – depends on business context
3. IF any verb refers to nouns which are not selected as
entity types THEN do not model it as a relationship
type
 Students Fills Enrollment Form. Here neither Enrollment
form is entity nor FillsIn is a relationship
ER Creating Guidelines
Data Modeling Using E-R Models 50
 Below are rules related to cardinality and
participation. Suppose Entity A relates to entity
B, then
2. For each A, what is the maximum number of
Bs that may be related to it?
3. IF A can exist without being associated with a
B THEN A has partial (optional) participation
ELSE A has total (mandatory) participation.
Example - Student Election scenario
Data Modeling Using E-R Models 51
 Consider


 There are some positions for which voting needs to
be done
For each position there can be N candidates
When voting takes place we want to make sure that
no body votes twice.
Example - Student Election scenario
extended
Data Modeling Using E-R Models 52

 How our ERD will change if we have some
requirements/constraints-
Suppose we want to keep track of who has voted to
whom
 Suppose there is constraints that for some positions
students from certain program can only vote
 Suppose there is another constraint that for some
position students from certain program can only be
candidates
Home Exercises
Data Modeling Using E-R Models 53
 Elmasri/Navathe 4th ed
 Unsolved Exercise: 3.21, 3.22
Ternary Relationship


Data Modeling Using E-R Models 54
Three entities are participating in a relationship
Most case binary suffices, but ternary/n-ary comes in
some cases
An example of ternary Relationship
Data Modeling Using E-R Models 55
Enhanced Features in ER modeling
Data Modeling Using E-R Models 56

 Primarily addresses issues related to
generalization/specialization, aggregation,
which were missing in Chen’s original ER
model
Features suggested by Elmasri/Navathe appears
to be complete covering most aspects of
generalization/specialization, aggregation
Aggregation
 Let us take an Example Company-Interview-Applicant-
Offer situation
Data Modeling Using E-R Models 57
Aggregation
Data Modeling Using E-R Models 58
Thanks
Data Modeling Using E-R Models 59
Ad

More Related Content

What's hot (20)

Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
aakanksha s
 
E R model
E R modelE R model
E R model
Логан Тибо
 
Database design
Database designDatabase design
Database design
FLYMAN TECHNOLOGY LIMITED
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
welcometofacebook
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design Issue
Amiya9439793168
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
Rubal Sagwal
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
Novita Sari
 
Datastage database design and data modeling ppt 4
Datastage database design and data modeling ppt 4Datastage database design and data modeling ppt 4
Datastage database design and data modeling ppt 4
Vibrant Technologies & Computers
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Mobarok Hossen
 
Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And Er
Ashwani Kumar Ramani
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational Model
Amiya9439793168
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
Nargis Ehsan
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
Adri Jovin
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
Ahmed Magdy
 
Data modeling
Data modelingData modeling
Data modeling
Atanu Chatterjee
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
Edwin Ayernor
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
VisnuDharsini
 
Data modeling
Data modelingData modeling
Data modeling
Tala Alnaber
 
E-R Diagram of College Management Systems
E-R Diagram of College Management SystemsE-R Diagram of College Management Systems
E-R Diagram of College Management Systems
Omprakash Chauhan
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
aakanksha s
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
welcometofacebook
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design Issue
Amiya9439793168
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
Rubal Sagwal
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
Novita Sari
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Mobarok Hossen
 
Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And Er
Ashwani Kumar Ramani
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational Model
Amiya9439793168
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
Adri Jovin
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
Edwin Ayernor
 
E-R Diagram of College Management Systems
E-R Diagram of College Management SystemsE-R Diagram of College Management Systems
E-R Diagram of College Management Systems
Omprakash Chauhan
 

Similar to Conceptual Data Modelling Using ER-models (20)

"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles
EliasZerabruk
 
U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdfDBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
deshna2thunga0
 
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptxCOMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
claritoBaluyot2
 
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptxCOMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
claritoBaluyot2
 
Data Modelling on the Relation between two or more variables
Data Modelling on the Relation between two or more variablesData Modelling on the Relation between two or more variables
Data Modelling on the Relation between two or more variables
AminuHassanJakada1
 
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
cherkoswelday3
 
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
cherkoswelday3
 
Db lec 01
Db lec 01Db lec 01
Db lec 01
Ramadan Babers, PhD
 
Database model
Database modelDatabase model
Database model
Shashwat Shriparv
 
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghgggch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
RajkumarSarker1
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
Ramadan Babers, PhD
 
Module 1 session 5
Module 1   session 5Module 1   session 5
Module 1 session 5
raghuinfo
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
Prof. Dr. K. Adisesha
 
ER modeling
ER modelingER modeling
ER modeling
Dabbal Singh Mahara
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
fikadumola
 
Er model
Er modelEr model
Er model
slidenageswaran
 
Relational data base and Er diagema Normalization
Relational data base and Er diagema NormalizationRelational data base and Er diagema Normalization
Relational data base and Er diagema Normalization
saranyaksr92
 
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRADATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
saranyaksr92
 
ER Model Ppt.ppt
ER Model Ppt.pptER Model Ppt.ppt
ER Model Ppt.ppt
DivyaRasrogi
 
"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles"Comprehensive Guide to Effective Database Design Principles
"Comprehensive Guide to Effective Database Design Principles
EliasZerabruk
 
U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdfDBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
DBMS_Chapter3mklkjjkhgffgjtdjdffgfygyfty.pdf
deshna2thunga0
 
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptxCOMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
claritoBaluyot2
 
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptxCOMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
claritoBaluyot2
 
Data Modelling on the Relation between two or more variables
Data Modelling on the Relation between two or more variablesData Modelling on the Relation between two or more variables
Data Modelling on the Relation between two or more variables
AminuHassanJakada1
 
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pdf
cherkoswelday3
 
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
03 CHAPTER TWO - CONCEPTUAL DATABASE DESIGN.pptx
cherkoswelday3
 
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghgggch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
ch7.pptbbbbbbbbgggfrredddddddddyuiklkrwwyjhghggg
RajkumarSarker1
 
Module 1 session 5
Module 1   session 5Module 1   session 5
Module 1 session 5
raghuinfo
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
fikadumola
 
Relational data base and Er diagema Normalization
Relational data base and Er diagema NormalizationRelational data base and Er diagema Normalization
Relational data base and Er diagema Normalization
saranyaksr92
 
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRADATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
DATABASE DESIGNS ER DIAGRAMS REATIONA; ALGEBRA
saranyaksr92
 
Ad

Recently uploaded (20)

OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdfOLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
DimejiFakorede
 
Doodle Table of Contents Infographics by Slidesgo.pptx
Doodle Table of Contents Infographics by Slidesgo.pptxDoodle Table of Contents Infographics by Slidesgo.pptx
Doodle Table of Contents Infographics by Slidesgo.pptx
binhyennghlu
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
An updated content measurement model - Elle Geraghty Content Strategy.pdf
An updated content measurement model - Elle Geraghty Content Strategy.pdfAn updated content measurement model - Elle Geraghty Content Strategy.pdf
An updated content measurement model - Elle Geraghty Content Strategy.pdf
Elle Geraghty
 
mid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptxmid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptx
omar164646
 
Baby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturalesBaby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturales
debbie loaiza
 
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptxHalstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
prachiikumarii1
 
Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...
kochars428
 
behiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdfbehiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdf
ShakibulHasan14
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
10.1155-2024-1048933Figurefig0008.pptx.ppt
10.1155-2024-1048933Figurefig0008.pptx.ppt10.1155-2024-1048933Figurefig0008.pptx.ppt
10.1155-2024-1048933Figurefig0008.pptx.ppt
suchandasaha7
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
19 Best B,u,y Verified Cash App Accounts
19 Best B,u,y Verified Cash App Accounts19 Best B,u,y Verified Cash App Accounts
19 Best B,u,y Verified Cash App Accounts
https://sellsusa.com/product/buy-verified-cash-app-accounts/
 
Lori Vanzant Portfolio. Please take a look !
Lori Vanzant  Portfolio. Please take a look !Lori Vanzant  Portfolio. Please take a look !
Lori Vanzant Portfolio. Please take a look !
vanzan01
 
Emily's slide design 101 - training module
Emily's slide design 101 - training moduleEmily's slide design 101 - training module
Emily's slide design 101 - training module
yourmisswright
 
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdfAR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
akshayap23
 
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdfMOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
asfianoor1
 
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
Friends of Figm a, Sydney
 
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdfOLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
DimejiFakorede
 
Doodle Table of Contents Infographics by Slidesgo.pptx
Doodle Table of Contents Infographics by Slidesgo.pptxDoodle Table of Contents Infographics by Slidesgo.pptx
Doodle Table of Contents Infographics by Slidesgo.pptx
binhyennghlu
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
An updated content measurement model - Elle Geraghty Content Strategy.pdf
An updated content measurement model - Elle Geraghty Content Strategy.pdfAn updated content measurement model - Elle Geraghty Content Strategy.pdf
An updated content measurement model - Elle Geraghty Content Strategy.pdf
Elle Geraghty
 
mid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptxmid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptx
omar164646
 
Baby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturalesBaby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturales
debbie loaiza
 
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptxHalstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
prachiikumarii1
 
Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...
kochars428
 
behiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdfbehiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdf
ShakibulHasan14
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
10.1155-2024-1048933Figurefig0008.pptx.ppt
10.1155-2024-1048933Figurefig0008.pptx.ppt10.1155-2024-1048933Figurefig0008.pptx.ppt
10.1155-2024-1048933Figurefig0008.pptx.ppt
suchandasaha7
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
Lori Vanzant Portfolio. Please take a look !
Lori Vanzant  Portfolio. Please take a look !Lori Vanzant  Portfolio. Please take a look !
Lori Vanzant Portfolio. Please take a look !
vanzan01
 
Emily's slide design 101 - training module
Emily's slide design 101 - training moduleEmily's slide design 101 - training module
Emily's slide design 101 - training module
yourmisswright
 
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdfAR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
AR.AKSHAYA PAMBALATH-PORTFOLIOFINAL_.pdf
akshayap23
 
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdfMOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
asfianoor1
 
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
Friends of Figm a, Sydney
 
Ad

Conceptual Data Modelling Using ER-models

  • 1. II BCA- IV SEMESTER BCA405 – System Analysis & Design Chapter 9- Conceptual Data Modeling Using ER Models By: Shailaja Kumary, Asst. Professor Dept. of Computer Science Canara College Mangalore Data Modeling Using E-R Models 1
  • 2. Data Model Data Modeling Using E-R Models 2  Data modeling is the most important task in database development   completeness – correctness – performance of database depends on correct data model …shows up how data are structured at Conceptual, Logical and Physical level  More formally, it is a collection of concepts that can be used to describe “Database Structure” - Elmasri/Navathe  “Database Structure”, we mean here - data types, relationships, and constraints
  • 3. Why Data Modeling Data Modeling Using E-R Models 3  It is essential step of database design, not optional  If no, it is like making a house without a plan!  Sometimes, in smaller applications, it may not be explicitly done or documented still it is done
  • 4. Phases of Database Design Data Modeling Using E-R Models 4   Requirement Analysis – Understand the business needs and Data Components within. Conceptual Design  Develop Higher/Conceptual Data Model – easily understandable by End- Users and Managers….. what this talk is about  Logical Design  Develop Logical/Implementation Schema in one of the implementation technologies like Relational, Object Relational, OO. Historically Hierarchical/Network Models  Physical Design  Develop Internal Schema – how files are stored on disk – deal with file organization, indexes, clustering etc.
  • 5. Conceptual Model Data Modeling Using E-R Models 5      Correct and Formal representation of data items are the objectives here Intuitive and Simple to understand – end users and managers can easily understand Centers on “what data items and business rules it contains” not on how they are stored or organized in application (or structured in a DBMS logically or physically) ER Diagrams and UML class diagrams are popular Conceptual models Implementation neutral
  • 6. E-R Diagram (Model ? ) Data Modeling Using E-R Models 6  As said, it is a popular high level Conceptual Data Model  ER Diagram are simple consists of just -    Entities – their attributes Relationship between entities Constraints on Entities and Relationship  Let us understand what these terms mean here?
  • 7. How we see data around us- 8 … …… ……….. … …… ……….. Data Modeling Using E-R Models 7 List of Students IIyr BTech(CS) Intake BCS BTech(Computer Science) 40 … BIT BTech(Information Technology) 40 … ….. ……. ….. … ….. …… …… … StudID Name DOB Fasther’s Name Address ………….. 060101 Aditi 12-10-88 … …… ……….. 060102 Anurag 10-02-89 … …… ……….. 060103 Arpit 11-07-8 List of Programs Offered by CSE D ….. …… …… ProgID ProgName epartment Data Modeling Using E-R Models 7
  • 8. How do we describe this data Data Modeling Using E-R Models 8  Careful watch reveals that we have two type of “entity sets” here-   Students and Programs Let us call all students together entity set, and Program together another entity set  Each Student entity has certain properties (or attributes) like Name, DOB, Fathers Name etc., and their values drawn from a predefined “value set”,  and similarly each program has certain attributes, and their values
  • 9. How do we describe this data Data Modeling Using E-R Models 9  If we attempt to describe student entity, typically it can be like this-     Name of Entity: Student Attributes: StudID, Name, DOB, FathersName, .. Each Attribute derives value from a value set (domain) StudID uniquely identifies a student entity in the set  This is description of Student entity, and we call it “Entity Type”  Similarly we describe Program Entity Type
  • 10. ERD notation for the Entity types Notations used here are, originally suggested by Dr Peter Chen in ’76, known as Chen’s notation Data Modeling Using E-R Models 10
  • 11. Entities and Attributes Data Modeling Using E-R Models 11     Entity is the basic object in ER model. It is thing which exists Each entity has attributes- properties that describe the entity, for example as we have seen- Entity: Student Attributes: StudID, Name, DOB, Father’s Name, Address, Entity: Program Attributes: ProgID, ProgName, Intake
  • 12. Entities and Attributes Data Modeling Using E-R Models 12  Attributes could be   Atomic – can not be meaningfully decomposed: Example DOB can not be decomposed in Day/Month/Year – DOB is atomic data Student-Name may or may not be atomic      If FirstName, LasteName have individual meaning Key Attributes Composite: Example Address (Street, City, PIN) Single valued and multi-valued Stored and Derived attributes
  • 13. Entities and Attributes in ERD Composite Attribute Multi-value Attribute Key Attribute Data Modeling Using E-R Models 13 Key attribute Uniquely Identifies an Entity in Entity Set
  • 14. Entities and Attributes Derived Attribute Data Modeling Using E-R Models 14
  • 15. Entity Type    Casually, very often term “entity” is used for “Entity Type”. An Entity Type describes schema or intention for a set of entities sharing the same structure. In OO terminology, an entity type is similar to a class, and an entity is similar to an instance Definition (Elmasri/Navathe): Entity Type defines a collection (or set) of entities that have the same attributes. Each Entity Type in the database is described by its name and attributes Data Modeling Using E-R Models 15
  • 16. Entity Set   The collection of entities of a particular entity type are grouped into an entity set, is also called extension of entity type. The entity set usually referred with the same name as of Entity Type 060103 Arpit 11-07-88 … …… ……….. ….. …… …… … …… ……….. Definition (El The collection in the databas Data Modeling Using E-R Models 16 StudID Name DOB Fasther’s Name Address ………….. 060101 Aditi 12-10-88 … …… ……….. 060102 Anurag 10-02-89 … …… ……….. masri/Navathe): of all entities of a particular type e at any point of time is called an entity set.
  • 17. Key Attributes   It is Attribute or set of Attributes, called Key Attribute which are used to uniquely identify the entity in the set An important constraint on entities of an entity type is the key constraint or uniqueness constraint. Key Attribute Data Modeling Using E-R Models 17 StudID Name DOB Address 060101 Aditi 12-10-88 …… 060102 Anurag 10-02-89 …… 060103 Arpit 11-07-88 …… ….. …… …… ……
  • 18. Value Sets (Domains) of Attributes Data Modeling Using E-R Models 18   Each simple attribute of an entity type is associated with a value set (or a domain of values), which specifies the set of values that may be assigned to that attribute for each individual entity Also known as domain constraint on an attribute
  • 19. Relationship Type, Instance, and Set Data Modeling Using E-R Models 19  Let us look at following facts –       Aditi studies in BIT Amit studies in BCS Arpit studies in BIT Varun studies in BEE Radhika studies in BIT Shyam studies in BCS    This shows Relationship between Student and Program entities (entity types to be precise) … let us give a name to it “Studies” – obvious choice Relationship also has type and set, here studies is Relationship Type, Each of above statement is instance of the type, and All together form relationship set
  • 21. Simple ER Diagram: Student-Program Relationship Data Modeling Using E-R Models 21
  • 22. Relationships can also have attributes Data Modeling Using E-R Models 22   In our previous example, suppose we also want to have study duration of a student in a program, then Let us say, we have attributes year_from, and year_to
  • 23. Cardinality Constraints for Binary Relationships Data Modeling Using E-R Models 23   Binary relationship, is the one in which two entity types participate. Based on the number of relationships instances in which an entity can participate, relationship types can be one following-    One to One (1:1) One to Many (1:N) Many to Many (M:N)  Example:  Customer – Bank Account as 1:1, 1:N, M:N
  • 24. One to One (1:1)  One Customer has one account and one account is owned by one customer Data Modeling Using E-R Models 24
  • 25. One to Many (1:N) Data Modeling Using E-R Models 25  One Customer has many accounts, and one account is owned by one customer
  • 26. Many to Many (M:N)  One Customer has many accounts, and one account is owned by multiple customers jointly Data Modeling Using E-R Models 26
  • 27. Cardinality Constraints for Binary Relationships Data Modeling Using E-R Models 27  Every Relationship Type has to be specified to be one these – a constraint on relationship type  Cardinality Constraints are also called Cardinality Ratio (Elmasri/Navathe), though not ratio in precise terms. Probably, because it written in ratio format (1:N)!  Some authors also call it Mapping Cardinality (Korth)  Cardinality Constraint appears to be better name, as it is an constraint on the cardinality of relationship instances into which a entity can participate at most.
  • 28. Some relationship examples? Data Modeling Using E-R Models 28  Identify and determine cardinality ratio?      Student and Mentor Bill and Item Course and Professor Course and Text Book Vehicle and Owner
  • 29. Participation can be Total (mandatory) or Partial (optional)     In our Customer-Account example- If customer record can exist in database without having associated with an account – then participation of customer is partial otherwise total. Can Customer exist without associating with a account? Probably Yes. Can account exist without associating with a customer? Probably No. Partial Participation Total Participation Data Modeling Using E-R Models 29
  • 30. Data Modeling Using E-R Models 30 Student-Program “schema”   Participation of Student in Studies relationship is mandatory – student has to study in a program. Participation of a Program can be optional – we may not take admission in a program. Total Participatio n Partial ParticipationData Modeling Using E-R Models 3 0
  • 31. Data Modeling Using E-R Models Student-Program schema Here we see that One student can participate only once— this means we are modeling the business rule that One Student can study in one programonly And, One Program can have many students. That is Right We can easily note that Participation of student is Mandatory While it is optional for Program. 31 This diagram lets us ensure that we are modeling right business rule in the database Business rules are modeled as constraints in data models Cardinality and Participation are important constraints in Data Model Data Modeling Using E-R Models 3 1
  • 32. Some relationship examples? Data Modeling Using E-R Models 32  Identify and determine cardinality ratio?      Student and Mentor Bill and Item Course and Professor Course and Text Book Vehicle and Owner
  • 33. Exercises Data Modeling Using E-R Models 33  Case: Simple Trading Company  Case: My Books Database
  • 34. Understand Cardinality Ratio Data Modeling Using E-R Models 34  Two of looking at-  To how many entities an entity can be associated with other side entity type  How many times an entity participates into the relationship
  • 35. Cardinality Constraint (Ratio)  One to One: Any entity (from any side) is associated with at most one entity in other side  One to Many: one side entity can be associated with multiple entities from other side  Many to Many: any entity from any side can be associated with multiple entities from other side 1 N Data Modeling Using E-R Models 35
  • 36. Cardinality Constraint (Ratio) – another way of looking at  One to One: any entity (from any side) can participate at most once in the relationship  One to Many: one side entity participates multiple times in the relationship  Many to Many: any entity from any side participates multiple times in the relationship 1 N Data Modeling Using E-R Models 36
  • 37. Structural Constraints Data Modeling Using E-R Models 37  Cardinality ratio and participation constraints in together are also called structural constraints.  Second approach of looking at cardinality constraints evolves another way of depicting structural constraints in ER Diagram
  • 38. ata Modeling Using E-R Models Another way of showing structural constraint  Min possibility a customer (entity) can participate in holds relationship is 0, and Max possibility it can participate in holds relationship is N, and same way for Account entity type it is one and only one (0,n) D (1,1) Data Modeling Using E-R Models 3 8
  • 39. ata Modeling Using E-R Models Another way of showing structural constraint – Many to Many  Min possibility an Account (entity) can participate in holds relationship is 1, and Max possibility it can can participate in holds relationship is N (0,n) (1,N) DData Modeling Using E-R Models 3 9
  • 40. Structural constraints Data Modeling Using E-R Models 40  Note that this notation takes care of participation constraints as well.  Having min participation zero is partial participation while, and having > 0 is total participation
  • 41. Recursive Relationship   Entity having relationship with itself There can be many situations like this     Employee supervises another employee One citizen is spouse of another citizen One course has pre-requisite of another course One category is parent of another category Data Modeling Using E-R Models 41
  • 42. Recursive Relationship r1: e5 is supervisor ofe1 r2: e1 is supervisor ofe2 r3: e1 is supervisor ofe2 r4: e5 is supervisor ofe4 r5: e4 is supervisor ofe6 r6: e4 is supervisor ofe7 e1 e2 e3 e4 e5 e6 e7 r1 Data Modeling Using E-R Models 42 r2 r3 r4 r5 r6 Roles: Supervisor (Green), Subordinate (Red) Employee Supervises
  • 43. What about Cardinality and participation constraints in Supervises relationship.. Data Modeling Using E-R Models 43  ?
  • 44. Weak Entity Types Data Modeling Using E-R Models 44     Entity that do not have key attributes of their own are called weak entity types These are attached to some regular/strong entity type, we call that entity as identifying or owner entity type, and we call the relationship between weak entity type and its owner entity type, identifying relationship. A weak entity type always has total participation in its identifying relationship. Examples:   Experience History of an Employee Dependents of an Employee
  • 46.  Data Modeling Using E-R Models 46 In some cases, database designer may choose to express weak entity as multi-value composite attribute of the owner entity type  However, this approach could only be possible if week entity does not participate in any other relationship than identifying relationships.
  • 47. ER Creating Guidelines Data Modeling Using E-R Models 47     As a thumb rule Nouns and Objects are candidate for Entities and Verbs for relationships in a problem description. Below are some rules suggested in [Entity-Relationship Modeling,A Practical how-to-guide, Yeol Song and Kristin Froehlich, IEEE Potentials, Dec-94/Jan-95, pg#29-34] 3. Every entity type should be important in its own right within the problem domain Address can not be an entity City, can be Yes or No
  • 48. ER Creating Guidelines Data Modeling Using E-R Models 48    1. IF an object type (noun) has only one property to store THEN it is an attribute of another entity type ELSE it is an entity type- Suppose naukari.com wants to store skills of job seekers, can it be attribute or entity? Can be Yes or No If we want to store more meaning to skills, For example “C++”: which platform, which functional Area etc., then it becomes entity, otherwise just attribute
  • 49. ER Creating Guidelines Data Modeling Using E-R Models 49 1. IF an object type has only one data instance THEN do not model as an entity type – example Director, DAIICT 2. IF a relationship needs to have a unique identifier THEN model it as an entity type   Consider “products are billed to customers”, appear like relationship, but bills are numbered, and uniquely identified, candidate for entity type. Similarly Pays, Orders look like relationships but are possibly entities – depends on business context 3. IF any verb refers to nouns which are not selected as entity types THEN do not model it as a relationship type  Students Fills Enrollment Form. Here neither Enrollment form is entity nor FillsIn is a relationship
  • 50. ER Creating Guidelines Data Modeling Using E-R Models 50  Below are rules related to cardinality and participation. Suppose Entity A relates to entity B, then 2. For each A, what is the maximum number of Bs that may be related to it? 3. IF A can exist without being associated with a B THEN A has partial (optional) participation ELSE A has total (mandatory) participation.
  • 51. Example - Student Election scenario Data Modeling Using E-R Models 51  Consider    There are some positions for which voting needs to be done For each position there can be N candidates When voting takes place we want to make sure that no body votes twice.
  • 52. Example - Student Election scenario extended Data Modeling Using E-R Models 52   How our ERD will change if we have some requirements/constraints- Suppose we want to keep track of who has voted to whom  Suppose there is constraints that for some positions students from certain program can only vote  Suppose there is another constraint that for some position students from certain program can only be candidates
  • 53. Home Exercises Data Modeling Using E-R Models 53  Elmasri/Navathe 4th ed  Unsolved Exercise: 3.21, 3.22
  • 54. Ternary Relationship   Data Modeling Using E-R Models 54 Three entities are participating in a relationship Most case binary suffices, but ternary/n-ary comes in some cases
  • 55. An example of ternary Relationship Data Modeling Using E-R Models 55
  • 56. Enhanced Features in ER modeling Data Modeling Using E-R Models 56   Primarily addresses issues related to generalization/specialization, aggregation, which were missing in Chen’s original ER model Features suggested by Elmasri/Navathe appears to be complete covering most aspects of generalization/specialization, aggregation
  • 57. Aggregation  Let us take an Example Company-Interview-Applicant- Offer situation Data Modeling Using E-R Models 57
  • 59. Thanks Data Modeling Using E-R Models 59