Short Notes: ER Model | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


E R Modeling: Entity-Relationship model (ER model) in software engineering is an 
abstract way to describe a database. Describing a database usually starts with a 
relational database, which stores data in tables.
Relationship
An association among entities
Relationship Set 
An association of entity sets
Entity: Anything that exists and can be distinguished/ real world object which can 
be distinguished from other objects.
Entity Set: A group of similar entities
• All entities in an entity set have the same set of attributes.
• Each entity set has a key.
• Can be mapped to a relation easily
Strong Entity Set: An entity set that has a primary key is termed a strong entity set. 
Weak Entity Set: An entity set may not have sufficient attributes to form a primary 
key. Such an entity set is termed a weak entity set. For a weak entity set to be 
meaningful, it must be associated with another entity set, called the identifying or 
owner entity set. Every weak entity must be associated with an identifying entity 
i.e., the weak entity set is said to be existence dependent on the identifying entity 
set.
Attribute: Properties that describe an entity or we can say attributes are descriptive 
properties possessed by each member of an entity set and each attribute has a 
domain.
There are many types of attributes
Page 2


E R Modeling: Entity-Relationship model (ER model) in software engineering is an 
abstract way to describe a database. Describing a database usually starts with a 
relational database, which stores data in tables.
Relationship
An association among entities
Relationship Set 
An association of entity sets
Entity: Anything that exists and can be distinguished/ real world object which can 
be distinguished from other objects.
Entity Set: A group of similar entities
• All entities in an entity set have the same set of attributes.
• Each entity set has a key.
• Can be mapped to a relation easily
Strong Entity Set: An entity set that has a primary key is termed a strong entity set. 
Weak Entity Set: An entity set may not have sufficient attributes to form a primary 
key. Such an entity set is termed a weak entity set. For a weak entity set to be 
meaningful, it must be associated with another entity set, called the identifying or 
owner entity set. Every weak entity must be associated with an identifying entity 
i.e., the weak entity set is said to be existence dependent on the identifying entity 
set.
Attribute: Properties that describe an entity or we can say attributes are descriptive 
properties possessed by each member of an entity set and each attribute has a 
domain.
There are many types of attributes
Composite Attribute: Attributes which can have component attribute, e.g., a 
composite attribute name, with component attributes First_Name, Middle_Name 
and Last_Name.
Derived Attribute: The value for this type of attribute can be derived from the values 
of other related attributes or entities. For instance, let us say that the customer 
entity set has an attribute Loans_Held, which represents how many loans a 
customer has from the bank. We can derive the value for this attribute by counting 
the number of loan entities associated with that customer.
Descriptive Attribute: If a relationship set has also some attributes associated with 
it, then we link these attributes to that relationship set. e.g., consider a relationship 
set depositor with entity sets customer and account. We could associate the 
attribute Access_Date to that relationship to specify the most recent date on which 
a customer accessed an account.
Single Valued Attribute: Attribute which has only one value, e.g., the 
Employee_Number attribute for a specific Employee_entity refers to only one 
employee number.
Multi Valued Attribute: Attributes which can have 0,1 or more than 1 values. An 
employee entity set with the attribute Phone_Number. An employee may have zero, 
one or several phone numbers and different employees may have different numbers 
of phones.
Prime Attributes: Attributes which are part of some candidate key.
Non-Prime Attributes: Attributes which are not part of any candidate key.
Notations/Shapes in E R Modeling
Page 3


E R Modeling: Entity-Relationship model (ER model) in software engineering is an 
abstract way to describe a database. Describing a database usually starts with a 
relational database, which stores data in tables.
Relationship
An association among entities
Relationship Set 
An association of entity sets
Entity: Anything that exists and can be distinguished/ real world object which can 
be distinguished from other objects.
Entity Set: A group of similar entities
• All entities in an entity set have the same set of attributes.
• Each entity set has a key.
• Can be mapped to a relation easily
Strong Entity Set: An entity set that has a primary key is termed a strong entity set. 
Weak Entity Set: An entity set may not have sufficient attributes to form a primary 
key. Such an entity set is termed a weak entity set. For a weak entity set to be 
meaningful, it must be associated with another entity set, called the identifying or 
owner entity set. Every weak entity must be associated with an identifying entity 
i.e., the weak entity set is said to be existence dependent on the identifying entity 
set.
Attribute: Properties that describe an entity or we can say attributes are descriptive 
properties possessed by each member of an entity set and each attribute has a 
domain.
There are many types of attributes
Composite Attribute: Attributes which can have component attribute, e.g., a 
composite attribute name, with component attributes First_Name, Middle_Name 
and Last_Name.
Derived Attribute: The value for this type of attribute can be derived from the values 
of other related attributes or entities. For instance, let us say that the customer 
entity set has an attribute Loans_Held, which represents how many loans a 
customer has from the bank. We can derive the value for this attribute by counting 
the number of loan entities associated with that customer.
Descriptive Attribute: If a relationship set has also some attributes associated with 
it, then we link these attributes to that relationship set. e.g., consider a relationship 
set depositor with entity sets customer and account. We could associate the 
attribute Access_Date to that relationship to specify the most recent date on which 
a customer accessed an account.
Single Valued Attribute: Attribute which has only one value, e.g., the 
Employee_Number attribute for a specific Employee_entity refers to only one 
employee number.
Multi Valued Attribute: Attributes which can have 0,1 or more than 1 values. An 
employee entity set with the attribute Phone_Number. An employee may have zero, 
one or several phone numbers and different employees may have different numbers 
of phones.
Prime Attributes: Attributes which are part of some candidate key.
Non-Prime Attributes: Attributes which are not part of any candidate key.
Notations/Shapes in E R Modeling
R e c ta n g le represents en tity ty p e
_ ¦
D o u b le .B o ld r e c ta n g le represent
w e a k en tity ty p e. 1 l - L — 1 1
D ia m o n d represent', relationsh ip 
ty p e.
< 0
D o u b le .B o ld d ia m o n d represents 
w e a k relationsh ip ty p e.
0"0
E llip se represents attribute-type.
o
D o u b le ellip se represents 
m u ltiva lu ed attribute:
o
D a s h e d ellip se d en ote s-d e riv e d 
attribute
m ”* 
¦ = .................."
L in e a link attribution en tity sets 
a n d en tity sets to relationsh ip sets
D o u b le lin es w h ich in d ica te total 
p articip ation o f an en tity in a 
relationsh ip set i.e ., each en tity in 
th e en tity set occu rs in atleast on e 
relationsh ip in that relationsh ip set.
Mapping Cardinalities / Cardinality Ratio / Types of Relationship: Expresses the 
number of entities to which another entity can be associated via a relationship set. 
For a binary relationship set R between entity sets A and B , the mapping cardinality 
must be one of the following:
• One to One: An entity in A is associated with at most one entity in B and an 
entity in B is associated with at most one entity in A.
• One to Many: An entity in A is associated with any number (zero or more) of 
entities; in B. An entity in B , however, can be associated with at most one 
entity in A.
• Many to Many: An entity in A is associated with any number (zero or more) c 
entities in B and an entity B is associated with any number (zero or more) of 
entities in A.
One to One Relationship
Many to Many Relationship
Specialization: Consider an entity set person with attributes name, street and city, A 
person may be further classified-as one of the following: Customer, and Employee. 
Each of these person types is described by a set of attributes 1 at includes all the 
attributes of entity set person plus possibly additional attributes. The process of 
designating subgroupings within an entity set is called specialization.
Page 4


E R Modeling: Entity-Relationship model (ER model) in software engineering is an 
abstract way to describe a database. Describing a database usually starts with a 
relational database, which stores data in tables.
Relationship
An association among entities
Relationship Set 
An association of entity sets
Entity: Anything that exists and can be distinguished/ real world object which can 
be distinguished from other objects.
Entity Set: A group of similar entities
• All entities in an entity set have the same set of attributes.
• Each entity set has a key.
• Can be mapped to a relation easily
Strong Entity Set: An entity set that has a primary key is termed a strong entity set. 
Weak Entity Set: An entity set may not have sufficient attributes to form a primary 
key. Such an entity set is termed a weak entity set. For a weak entity set to be 
meaningful, it must be associated with another entity set, called the identifying or 
owner entity set. Every weak entity must be associated with an identifying entity 
i.e., the weak entity set is said to be existence dependent on the identifying entity 
set.
Attribute: Properties that describe an entity or we can say attributes are descriptive 
properties possessed by each member of an entity set and each attribute has a 
domain.
There are many types of attributes
Composite Attribute: Attributes which can have component attribute, e.g., a 
composite attribute name, with component attributes First_Name, Middle_Name 
and Last_Name.
Derived Attribute: The value for this type of attribute can be derived from the values 
of other related attributes or entities. For instance, let us say that the customer 
entity set has an attribute Loans_Held, which represents how many loans a 
customer has from the bank. We can derive the value for this attribute by counting 
the number of loan entities associated with that customer.
Descriptive Attribute: If a relationship set has also some attributes associated with 
it, then we link these attributes to that relationship set. e.g., consider a relationship 
set depositor with entity sets customer and account. We could associate the 
attribute Access_Date to that relationship to specify the most recent date on which 
a customer accessed an account.
Single Valued Attribute: Attribute which has only one value, e.g., the 
Employee_Number attribute for a specific Employee_entity refers to only one 
employee number.
Multi Valued Attribute: Attributes which can have 0,1 or more than 1 values. An 
employee entity set with the attribute Phone_Number. An employee may have zero, 
one or several phone numbers and different employees may have different numbers 
of phones.
Prime Attributes: Attributes which are part of some candidate key.
Non-Prime Attributes: Attributes which are not part of any candidate key.
Notations/Shapes in E R Modeling
R e c ta n g le represents en tity ty p e
_ ¦
D o u b le .B o ld r e c ta n g le represent
w e a k en tity ty p e. 1 l - L — 1 1
D ia m o n d represent', relationsh ip 
ty p e.
< 0
D o u b le .B o ld d ia m o n d represents 
w e a k relationsh ip ty p e.
0"0
E llip se represents attribute-type.
o
D o u b le ellip se represents 
m u ltiva lu ed attribute:
o
D a s h e d ellip se d en ote s-d e riv e d 
attribute
m ”* 
¦ = .................."
L in e a link attribution en tity sets 
a n d en tity sets to relationsh ip sets
D o u b le lin es w h ich in d ica te total 
p articip ation o f an en tity in a 
relationsh ip set i.e ., each en tity in 
th e en tity set occu rs in atleast on e 
relationsh ip in that relationsh ip set.
Mapping Cardinalities / Cardinality Ratio / Types of Relationship: Expresses the 
number of entities to which another entity can be associated via a relationship set. 
For a binary relationship set R between entity sets A and B , the mapping cardinality 
must be one of the following:
• One to One: An entity in A is associated with at most one entity in B and an 
entity in B is associated with at most one entity in A.
• One to Many: An entity in A is associated with any number (zero or more) of 
entities; in B. An entity in B , however, can be associated with at most one 
entity in A.
• Many to Many: An entity in A is associated with any number (zero or more) c 
entities in B and an entity B is associated with any number (zero or more) of 
entities in A.
One to One Relationship
Many to Many Relationship
Specialization: Consider an entity set person with attributes name, street and city, A 
person may be further classified-as one of the following: Customer, and Employee. 
Each of these person types is described by a set of attributes 1 at includes all the 
attributes of entity set person plus possibly additional attributes. The process of 
designating subgroupings within an entity set is called specialization.
The specialization of person allows us to distinguish among persons according tc 
whether they are employees or customers,
The refinement from an initial entity set into successive levels of entity 
subgroupings represents a top-down design process in which distinctions are made 
explicitly.
Generalization: Basically generalization is a simple inversion of specialization. 
Some common attributes of multiple entity sets are chosen to create higher level 
entity set. If the customer entity set and the employee entity set are having several 
attributes in common, then this commonality can be expressed by generalization. 
Here, person is the higher level entity set and customer and employee are lower 
level entity sets. Higher and lower level entity sets also may be designated by- the 
terms super class and subclass, respectively.
Aggregation: Aggregation is used when we have to model a relationship involving 
entity set and a relationship set. Aggregation is an abstraction through which 
relationships are treated as higher level entities.
Integrity Constraints: Necessary conditions to be satisfied by the data values in the 
relational instances so that the set of data values constitute a meaningful 
database.
There are four types of integrity constraints
Domain Constraint: The value of attribute must be within the domain.
Key Constraint: Every relation must have a primary key.
Entity Integrity Constraint: Primary key of a relation should not contain NULL 
values.
Referential Integrity Constraint: In relational model, two relations are related to 
each other over the basis of attributes. Every value of referencing attributes must 
be NULL or be available in the referenced attribute.
Read More
90 docs

Top Courses for Computer Science Engineering (CSE)

Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Objective type Questions

,

Important questions

,

Semester Notes

,

past year papers

,

Viva Questions

,

ppt

,

Sample Paper

,

Summary

,

video lectures

,

Free

,

MCQs

,

Extra Questions

,

Exam

,

Short Notes: ER Model | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

pdf

,

Previous Year Questions with Solutions

,

Short Notes: ER Model | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

practice quizzes

,

mock tests for examination

,

shortcuts and tricks

,

Short Notes: ER Model | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

study material

;