ENTITY RELATIONSHIP MODEL
About – ER
.MODEL
Entity relationship model also called e-r model and it
is a high level model.
This model is used to define the data elements and
relationship for a specified system.
It develops a conceptual design for the database. It
also develops a very simple and easy to design view of
data.
In ER modeling, the database structure is portrayed
as a diagram called an entity-relationship diagram.
E
X
A
M
P
L
E
-
ComponentofE
RDiagram
-
Entity -
An entity may be any object, class, person or place.
In the ER diagram, an entity can be represented as
rectangles.
W
eakEntity
-
An entity that depends on another entity called a
weak entity.
The weak entity doesn't contain any key attribute of
its own.
The weak entity is represented by a double
rectangle.
 Attribute -
The attribute is used to describe the property of
an entity.
For example - id, age, contact number, name, etc.
can be attributes of a student.
K
e
yAttribute
-
The key attribute is used to represent the main
characteristics of an entity.
It represents a primary key.
The key attribute is represented by an oval shape with
the text underlined.
CompositeAttribute
-
An attribute that composed of many other
attributes is known as a composite attribute.
MultivaluedAttribute
-
An attribute can have more than one value.
These attributes are known as a multivalued
attribute.
The double oval is used to represent multivalued
attribute.
DerivedAttribute
-
An attribute that can be derived from other attribute
is known as a derived attribute.
It can be represented by a dashed oval.
Relationship -
A relationship is used to describe the relation
between entities.
Diamond shape is used to represent the
relationship.
There are two types one is strong relation and
second is weak relation.
Strong relationship represented by a single diamond
where weak relationship represented by double
diamond
T
ypesofrelationship
-
1.One-to-One Relationship
When only one instance of an entity is associated
with the relationship, then it is known as one to one
relationship.
For example, A female can marry to one male,
and a male can marry to one female.
2.One-to-many relationship
When only one instance of the entity on the left, and
more than one instance of an entity on the right
associates with the relationship then this is known as a
one-to-many relationship.
For example, Scientist can invent many inventions, but
the invention is done by the only specific scientist.
3.Many-to-one relationship
When more than one instance of the entity on the left,
and only one instance of an entity on the right associates
with the relationship then it is known as a many-to-one
relationship.
For example, Student enrolls for only one course, but a
course can have many students.
4.Many-to-many relationship
When more than one instance of the entity on the left,
and more than one instance of an entity on the right
associates with the relationship then it is known as a many-
to-many relationship.
For example, Employee can assign by many projects and
project can have many employees.
KKEYS
• SUPER KEY…………….STUD NO, {STUD NO,STUD NAME}, {STUD
NO,STUD_AGE} ETC.
• CANDIDATE KEY…………STUD_NO………STUD_AGE.
• PRIMARY KEY……………..STUD NO.
• ALTERNATE KEY…………..STUD_AGE
• FOREIGN KEY…………..STUD NO LINKING BOTH TABLES.
Super Key: The set of attributes which can uniquely identify a tuple is known as Super Key. For Example,
STUD_NO, (STUD_NO, STUD_NAME) etc.
Adding zero or more attributes to candidate key generates super key.
A candidate key is a super key but vice versa is not true.
Candidate Key: The minimal set of attribute which can uniquely identify a tuple is known as candidate key. For
Example, STUD_NO in STUDENT relation.
The value of Candidate Key is unique and non-null for every tuple.
There can be more than one candidate key in a relation. For Example, STUD_NO is candidate key for relation
STUDENT.
The candidate key can be simple (having only one attribute) or composite as well. For Example, {STUD_NO,
COURSE_NO} is a composite candidate key for relation STUDENT_COURSE.
Note – In Sql Server a unique constraint that has a nullable column, allows the value ‘null‘ in that column only
once. That’s why STUD_PHONE attribute as candidate here, but can not be ‘null’ values in primary key attribute.
Primary Key: There can be more than one candidate key in relation out of which one can be chosen as the
primary key. For Example, STUD_NO, as well as STUD_PHONE both, are candidate keys for relation STUDENT but
STUD_NO can be chosen as the primary key (only one out of many candidate keys).
Alternate Key: The candidate key other than the primary key is called an alternate key. For Example, STUD_NO,
as well as STUD_PHONE both, are candidate keys for relation STUDENT but STUD_PHONE will be alternate key
(only one out of many candidate keys).
Foreign Key: If an attribute can only take the values which are present as values of some other attribute, it will
be a foreign key to the attribute to which it refers. The relation which is being referenced is called referenced
relation and the corresponding attribute is called referenced attribute and the relation which refers to the
referenced relation is called referencing relation and the corresponding attribute is called referencing attribute.
The referenced attribute of the referenced relation should be the primary key for it. For Example, STUD_NO in
STUDENT_COURSE is a foreign key to STUD_NO in STUDENT relation.
It may be worth noting that unlike, Primary Key of any given relation, Foreign Key can be NULL as well as may
contain duplicate tuples i.e. it need not follow uniqueness constraint.
For Example, STUD_NO in STUDENT_COURSE relation is not unique. It has been repeated for the first and third
tuple. However, the STUD_NO in STUDENT relation is a primary key and it needs to be always unique and it
cannot be null.
Example of ER model
Example of ER model library
E R hospital management
E R MODEL-banking system.

More Related Content

PPTX
Module 2 dbms.pptx
PPTX
Data Models.pptx
PDF
Databases - Unit 2.pdf
PPTX
RELATIONSHIP IN DBMS.pptx
PPT
ERD(2).ppt
PPTX
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
PPTX
ER Modeling and Introduction to RDBMS
PPTX
rdbmsdol.pptx
Module 2 dbms.pptx
Data Models.pptx
Databases - Unit 2.pdf
RELATIONSHIP IN DBMS.pptx
ERD(2).ppt
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
ER Modeling and Introduction to RDBMS
rdbmsdol.pptx

Similar to Entity Relationship Management Moder: Introduction (20)

PPTX
rdbmsdol.pptx
PPT
18306_lec-2 (1).ppt
PPTX
DBMS-Keys , Attributes and Constraints.pptx
PPT
Relational model for Databases
PDF
UNIT 2 DATABASE DESIGN 9.pdf ER DIAGRAMS
PPTX
DBMS - Relational Model, Relational Table
PPTX
ER diagram
PPT
Entity relationship diagram for dummies
PPT
Relational model
PPT
Relational model
PPT
Relational model
PDF
Advance database system (part 3)
PPTX
RDBMS-1.pptx. best one this. Will help
PPTX
er-models.pptx
PPTX
relational data model in RDBMS USING KEYS.pptx
PPTX
relational data model In rdbms keys.pptx
PPTX
relational data model in DBMS AND KEYS.pptx
PPTX
Database design
PPTX
Database design
PPTX
Entity Relationship Model
rdbmsdol.pptx
18306_lec-2 (1).ppt
DBMS-Keys , Attributes and Constraints.pptx
Relational model for Databases
UNIT 2 DATABASE DESIGN 9.pdf ER DIAGRAMS
DBMS - Relational Model, Relational Table
ER diagram
Entity relationship diagram for dummies
Relational model
Relational model
Relational model
Advance database system (part 3)
RDBMS-1.pptx. best one this. Will help
er-models.pptx
relational data model in RDBMS USING KEYS.pptx
relational data model In rdbms keys.pptx
relational data model in DBMS AND KEYS.pptx
Database design
Database design
Entity Relationship Model
Ad

More from gufranqureshi506 (20)

PPT
Mapping and cardiality for Entity Relationship
PPT
Entitiy Relationship Introduction Diagram
PPTX
Data base management system-Introduction
PPT
Introduction to R for Data Science Technology
PPT
Introduction to Scala for Data Science Technology
PPTX
Introdcution to Machine Learning and its types.
PPTX
Introdcution to Deep Learning and Machine Learning
PPTX
Computer forensic presentation and roles of first responder
PPTX
cyber forensic presentation on practicals
PPTX
Web Application Programming Interface (Web)
PPTX
Applications Programming Interfaces (API)
PPT
Evolution of Data Warehouse and Data mining
PPT
Data Mining and Data Warehouse Introuduction
PPT
Architecture of Data Warehouse for Data Science
PPT
Introduction to Data Warehouse for Data Science
PPTX
Introduction to Topology of Computer Networkds
PPTX
Introduction to Computer Network SYBSCIT
PPTX
Introduction to Deep Learning and Machine Learning.pptx
PPTX
Introduction to Augment Reality, VR and MR.pptx
PPTX
Unit 1 Green IT for first year bscit.pptx
Mapping and cardiality for Entity Relationship
Entitiy Relationship Introduction Diagram
Data base management system-Introduction
Introduction to R for Data Science Technology
Introduction to Scala for Data Science Technology
Introdcution to Machine Learning and its types.
Introdcution to Deep Learning and Machine Learning
Computer forensic presentation and roles of first responder
cyber forensic presentation on practicals
Web Application Programming Interface (Web)
Applications Programming Interfaces (API)
Evolution of Data Warehouse and Data mining
Data Mining and Data Warehouse Introuduction
Architecture of Data Warehouse for Data Science
Introduction to Data Warehouse for Data Science
Introduction to Topology of Computer Networkds
Introduction to Computer Network SYBSCIT
Introduction to Deep Learning and Machine Learning.pptx
Introduction to Augment Reality, VR and MR.pptx
Unit 1 Green IT for first year bscit.pptx
Ad

Recently uploaded (20)

PDF
Unlock new opportunities with location data.pdf
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
August Patch Tuesday
PDF
Hybrid model detection and classification of lung cancer
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Five Habits of High-Impact Board Members
PDF
Getting started with AI Agents and Multi-Agent Systems
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
sustainability-14-14877-v2.pddhzftheheeeee
DOCX
search engine optimization ppt fir known well about this
PPTX
Tartificialntelligence_presentation.pptx
PPTX
The various Industrial Revolutions .pptx
PDF
CloudStack 4.21: First Look Webinar slides
PPT
Geologic Time for studying geology for geologist
PDF
Architecture types and enterprise applications.pdf
PPT
What is a Computer? Input Devices /output devices
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
Unlock new opportunities with location data.pdf
Benefits of Physical activity for teenagers.pptx
August Patch Tuesday
Hybrid model detection and classification of lung cancer
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A comparative study of natural language inference in Swahili using monolingua...
Five Habits of High-Impact Board Members
Getting started with AI Agents and Multi-Agent Systems
Module 1.ppt Iot fundamentals and Architecture
Hindi spoken digit analysis for native and non-native speakers
sustainability-14-14877-v2.pddhzftheheeeee
search engine optimization ppt fir known well about this
Tartificialntelligence_presentation.pptx
The various Industrial Revolutions .pptx
CloudStack 4.21: First Look Webinar slides
Geologic Time for studying geology for geologist
Architecture types and enterprise applications.pdf
What is a Computer? Input Devices /output devices
A contest of sentiment analysis: k-nearest neighbor versus neural network

Entity Relationship Management Moder: Introduction

  • 2. About – ER .MODEL Entity relationship model also called e-r model and it is a high level model. This model is used to define the data elements and relationship for a specified system. It develops a conceptual design for the database. It also develops a very simple and easy to design view of data. In ER modeling, the database structure is portrayed as a diagram called an entity-relationship diagram.
  • 5. Entity - An entity may be any object, class, person or place. In the ER diagram, an entity can be represented as rectangles.
  • 6. W eakEntity - An entity that depends on another entity called a weak entity. The weak entity doesn't contain any key attribute of its own. The weak entity is represented by a double rectangle.
  • 7.  Attribute - The attribute is used to describe the property of an entity. For example - id, age, contact number, name, etc. can be attributes of a student.
  • 8. K e yAttribute - The key attribute is used to represent the main characteristics of an entity. It represents a primary key. The key attribute is represented by an oval shape with the text underlined.
  • 9. CompositeAttribute - An attribute that composed of many other attributes is known as a composite attribute.
  • 10. MultivaluedAttribute - An attribute can have more than one value. These attributes are known as a multivalued attribute. The double oval is used to represent multivalued attribute.
  • 11. DerivedAttribute - An attribute that can be derived from other attribute is known as a derived attribute. It can be represented by a dashed oval.
  • 12. Relationship - A relationship is used to describe the relation between entities. Diamond shape is used to represent the relationship. There are two types one is strong relation and second is weak relation. Strong relationship represented by a single diamond where weak relationship represented by double diamond
  • 13. T ypesofrelationship - 1.One-to-One Relationship When only one instance of an entity is associated with the relationship, then it is known as one to one relationship. For example, A female can marry to one male, and a male can marry to one female.
  • 14. 2.One-to-many relationship When only one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then this is known as a one-to-many relationship. For example, Scientist can invent many inventions, but the invention is done by the only specific scientist.
  • 15. 3.Many-to-one relationship When more than one instance of the entity on the left, and only one instance of an entity on the right associates with the relationship then it is known as a many-to-one relationship. For example, Student enrolls for only one course, but a course can have many students.
  • 16. 4.Many-to-many relationship When more than one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then it is known as a many- to-many relationship. For example, Employee can assign by many projects and project can have many employees.
  • 17. KKEYS • SUPER KEY…………….STUD NO, {STUD NO,STUD NAME}, {STUD NO,STUD_AGE} ETC. • CANDIDATE KEY…………STUD_NO………STUD_AGE. • PRIMARY KEY……………..STUD NO. • ALTERNATE KEY…………..STUD_AGE • FOREIGN KEY…………..STUD NO LINKING BOTH TABLES.
  • 18. Super Key: The set of attributes which can uniquely identify a tuple is known as Super Key. For Example, STUD_NO, (STUD_NO, STUD_NAME) etc. Adding zero or more attributes to candidate key generates super key. A candidate key is a super key but vice versa is not true. Candidate Key: The minimal set of attribute which can uniquely identify a tuple is known as candidate key. For Example, STUD_NO in STUDENT relation. The value of Candidate Key is unique and non-null for every tuple. There can be more than one candidate key in a relation. For Example, STUD_NO is candidate key for relation STUDENT. The candidate key can be simple (having only one attribute) or composite as well. For Example, {STUD_NO, COURSE_NO} is a composite candidate key for relation STUDENT_COURSE. Note – In Sql Server a unique constraint that has a nullable column, allows the value ‘null‘ in that column only once. That’s why STUD_PHONE attribute as candidate here, but can not be ‘null’ values in primary key attribute. Primary Key: There can be more than one candidate key in relation out of which one can be chosen as the primary key. For Example, STUD_NO, as well as STUD_PHONE both, are candidate keys for relation STUDENT but STUD_NO can be chosen as the primary key (only one out of many candidate keys). Alternate Key: The candidate key other than the primary key is called an alternate key. For Example, STUD_NO, as well as STUD_PHONE both, are candidate keys for relation STUDENT but STUD_PHONE will be alternate key (only one out of many candidate keys). Foreign Key: If an attribute can only take the values which are present as values of some other attribute, it will be a foreign key to the attribute to which it refers. The relation which is being referenced is called referenced relation and the corresponding attribute is called referenced attribute and the relation which refers to the referenced relation is called referencing relation and the corresponding attribute is called referencing attribute. The referenced attribute of the referenced relation should be the primary key for it. For Example, STUD_NO in STUDENT_COURSE is a foreign key to STUD_NO in STUDENT relation. It may be worth noting that unlike, Primary Key of any given relation, Foreign Key can be NULL as well as may contain duplicate tuples i.e. it need not follow uniqueness constraint. For Example, STUD_NO in STUDENT_COURSE relation is not unique. It has been repeated for the first and third tuple. However, the STUD_NO in STUDENT relation is a primary key and it needs to be always unique and it cannot be null.
  • 19. Example of ER model
  • 20. Example of ER model library
  • 21. E R hospital management
  • 22. E R MODEL-banking system.