SlideShare una empresa de Scribd logo
1 de 40
ER- MODEL & RELATIONAL
MODEL
Dr. Robin Mathur,
LPU
DATA MODEL
Slide 1-2
A collection of tools for describing
Data
Data relationships
Data semantics
Data constraints
ER MODEL
• The ER model defines the conceptual view of a
database. It works around real-world entities
and the associations among them. At view
level, the ER model is considered a good
option for designing databases.
Slide 1-3
E-R model stands for Entity Relationship model. ER Model is
used to model the logical view of the system from data
perspective which consists of these components: Entity, Entity
Type, Entity Set.
An Entity may be an object with a physical existence – a
particular person, car, house, or employee – or it may be an
object with a conceptual existence – a company, a job, or a
university course.
An Entity is an object of Entity Type and set of all entities is
called as entity set. e.g.; E1 is an entity having Entity Type
Student and set of all students is called Entity Set.
ER MODEL
Relational data model
• The relational model used the basic concept of a relation or
table.
• The columns or fields in the table identify the attributes such
as name, age ,etc A tuple or row contains all the data of a
single instance of the table
• In the relational model, every tuple must have a unique
identification or key based on the data.
• Relational model also includes concepts such as foreign keys,
which are primary keys in one relation that re kept in another
relation to allow for the joining of data.
Slide 1-5
Relational data model
• Relational Model was proposed by E.F. Codd
to model data in the form of relations or
tables. After designing the conceptual model
of Database using ER diagram, we need to
convert the conceptual model in the relational
model which can be implemented using any
RDMBS languages like Oracle SQL, MySQL etc.
Relational data model
Slide 1-7
Database Designing
E-R Model Constructs
• Entity instance - person, place, object, event, concept
(often corresponds to a row in a table)
• Attribute - property or characteristic of an entity type
(often corresponds to a field in a table)
• Relationship instance – link between entities
(corresponds to primary key-foreign key equivalencies
in related tables)
– Relationship type – category of relationship…link between
entity types
Sample
E-R
Diagram
Basic E-R Notation
Entity
symbols
Relationship
symbols
Attribute
symbols
A special
entity that is
also a
relationship
Basic E-R Notation
E-R Model Constructs: Entity Type
• Entity - person, place, object, event, concept
Example of a weak entity
E-R Model Constructs: Attributes
• Attribute: a property or characteristic of an entity type
that is of interest to the organization
• Simple versus Composite Attribute
– a simple attribute cannot be broken down into smaller
components, while a composite attribute can be
broken down into component parts
– Single-Valued versus Multivalued Attribute
• Stored versus Derived Attributes
– A stored attribute is one whose values are stored in the
database
– A derived attribute is one whose whose values can be
calculated from related stored attributes
A composite attribute
An attribute
broken into
component parts
Entity with a multivalued attribute (Skill)
and derived attribute (Years_Employed)
Multivalued:
an employee can have
more than one skill
Derived
from date employed and current date
Attribute that is both multivalued and composite
This is an
example of
time-stamping
E-R Model Constructs: Identifier or Key
• Identifier or Key
– an attribute (or combination of attributes) that
uniquely identifies individual instances of an entity
type
• Simple Key versus Composite Key
• Candidate Key - an attribute that could be a key
• Criteria for Selecting Identifiers
– Will not change in value
– Will not be null
– No intelligent identifiers (containing e.g. locations or
people that might change)
– Substitute new, simple keys for long, composite keys
Simple key attribute
The key is underlined
Composite key attribute
The key is composed
of two subparts
Relationships
• Relationship type (is a meaningful association between entity
types; is modeled as the diamond and lines between entity
types; can have attributes) vs. Instance
• Multiple Relationships
– more than one type of relationship between entities
• Degree of a relationship - number of entity types that
participate in it
– Unary (or Recursive) Relationship
– Binary Relationship
– Ternary Relationship
• Cardinality of Relationships
• Many-to-Many and Associative Entities (combination of
relationship and entity)
– All relationships involved are “many”
– Result has independent meaning
– One or more non-key attributes
Relationship type (Completes)
Degree of relationships
One entity
related to
another of
the same
entity type
Entities of
two different
types related
to each other
Entities of three
different types
related to each
other
Cardinality of Relationships
• One – to – One
– Each entity in the relationship will have exactly one related
entity
• One – to – Many
– An entity on one side of the relationship can have many
related entities, but an entity on the other side will have a
maximum of one related entity
• Many – to – Many
– Entities on both sides of the relationship can have many
related entities on the other side
Cardinality
Unary relationships
Binary relationships
Ternary relationships
Note: a relationship can have attributes of its own
Strong and weak entities
Strong entity Weak entity
Identifying relationship
Slide 1-31
SOME MCQS …
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx
ER MODEL.pptx

Más contenido relacionado

Similar a ER MODEL.pptx

erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
vinayakjadhav94
 
dbms (database management system )1.pptx
dbms (database management system )1.pptxdbms (database management system )1.pptx
dbms (database management system )1.pptx
227r1a0519
 

Similar a ER MODEL.pptx (20)

Database design
Database designDatabase design
Database design
 
Entity-Relationship Data Model
Entity-Relationship Data ModelEntity-Relationship Data Model
Entity-Relationship Data Model
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
Use analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptxUse analyzed requirements in the design of database.pptx
Use analyzed requirements in the design of database.pptx
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Er model
Er modelEr model
Er model
 
Lecture one db
Lecture one dbLecture one db
Lecture one db
 
database
databasedatabase
database
 
database.pptx
database.pptxdatabase.pptx
database.pptx
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
dbms (database management system )1.pptx
dbms (database management system )1.pptxdbms (database management system )1.pptx
dbms (database management system )1.pptx
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..
 

Último

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Último (20)

(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
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
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 

ER MODEL.pptx

  • 1. ER- MODEL & RELATIONAL MODEL Dr. Robin Mathur, LPU
  • 2. DATA MODEL Slide 1-2 A collection of tools for describing Data Data relationships Data semantics Data constraints
  • 3. ER MODEL • The ER model defines the conceptual view of a database. It works around real-world entities and the associations among them. At view level, the ER model is considered a good option for designing databases. Slide 1-3
  • 4. E-R model stands for Entity Relationship model. ER Model is used to model the logical view of the system from data perspective which consists of these components: Entity, Entity Type, Entity Set. An Entity may be an object with a physical existence – a particular person, car, house, or employee – or it may be an object with a conceptual existence – a company, a job, or a university course. An Entity is an object of Entity Type and set of all entities is called as entity set. e.g.; E1 is an entity having Entity Type Student and set of all students is called Entity Set. ER MODEL
  • 5. Relational data model • The relational model used the basic concept of a relation or table. • The columns or fields in the table identify the attributes such as name, age ,etc A tuple or row contains all the data of a single instance of the table • In the relational model, every tuple must have a unique identification or key based on the data. • Relational model also includes concepts such as foreign keys, which are primary keys in one relation that re kept in another relation to allow for the joining of data. Slide 1-5
  • 6. Relational data model • Relational Model was proposed by E.F. Codd to model data in the form of relations or tables. After designing the conceptual model of Database using ER diagram, we need to convert the conceptual model in the relational model which can be implemented using any RDMBS languages like Oracle SQL, MySQL etc.
  • 8.
  • 9. Database Designing E-R Model Constructs • Entity instance - person, place, object, event, concept (often corresponds to a row in a table) • Attribute - property or characteristic of an entity type (often corresponds to a field in a table) • Relationship instance – link between entities (corresponds to primary key-foreign key equivalencies in related tables) – Relationship type – category of relationship…link between entity types
  • 13. E-R Model Constructs: Entity Type • Entity - person, place, object, event, concept
  • 14. Example of a weak entity
  • 15. E-R Model Constructs: Attributes • Attribute: a property or characteristic of an entity type that is of interest to the organization • Simple versus Composite Attribute – a simple attribute cannot be broken down into smaller components, while a composite attribute can be broken down into component parts – Single-Valued versus Multivalued Attribute • Stored versus Derived Attributes – A stored attribute is one whose values are stored in the database – A derived attribute is one whose whose values can be calculated from related stored attributes
  • 16. A composite attribute An attribute broken into component parts
  • 17. Entity with a multivalued attribute (Skill) and derived attribute (Years_Employed) Multivalued: an employee can have more than one skill Derived from date employed and current date
  • 18. Attribute that is both multivalued and composite This is an example of time-stamping
  • 19. E-R Model Constructs: Identifier or Key • Identifier or Key – an attribute (or combination of attributes) that uniquely identifies individual instances of an entity type • Simple Key versus Composite Key • Candidate Key - an attribute that could be a key • Criteria for Selecting Identifiers – Will not change in value – Will not be null – No intelligent identifiers (containing e.g. locations or people that might change) – Substitute new, simple keys for long, composite keys
  • 20. Simple key attribute The key is underlined
  • 21. Composite key attribute The key is composed of two subparts
  • 22. Relationships • Relationship type (is a meaningful association between entity types; is modeled as the diamond and lines between entity types; can have attributes) vs. Instance • Multiple Relationships – more than one type of relationship between entities • Degree of a relationship - number of entity types that participate in it – Unary (or Recursive) Relationship – Binary Relationship – Ternary Relationship • Cardinality of Relationships • Many-to-Many and Associative Entities (combination of relationship and entity) – All relationships involved are “many” – Result has independent meaning – One or more non-key attributes
  • 24. Degree of relationships One entity related to another of the same entity type Entities of two different types related to each other Entities of three different types related to each other
  • 25. Cardinality of Relationships • One – to – One – Each entity in the relationship will have exactly one related entity • One – to – Many – An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity • Many – to – Many – Entities on both sides of the relationship can have many related entities on the other side
  • 29. Ternary relationships Note: a relationship can have attributes of its own
  • 30. Strong and weak entities Strong entity Weak entity Identifying relationship