SlideShare a Scribd company logo
ER Diagrams
To be discussed:-
 Entity
 Attribute
 Types of Attribute
 Relationship
 ER Diagram Representation
 Generalization
 Specialization
 Inheritance
 Codd’s 12 Rule
 Relational Data Model
 ER Model to Relational Model
Entity
 An entity can be a real-world object, either
animate or inanimate, that can be easily
identifiable. Example : School Database
 Teachers
 Students
 Classes
 Courses offered
Entity set
 An entity set is a collection of similar types of
entities. An entity set may contain entities
with attribute sharing similar values.
Attributes
Entities are represented by means of their properties,
called attributes. All attributes have
values. Example : Student :- Name, Class, Age
Types of Attributes
 Simple attribute − Simple attributes are atomic
values, which cannot be divided further. For
example, a student's phone number is an atomic
value of 10 digits.
 Composite attribute − example, a student's
complete name may have first_name and
last_name.
Types of Attributes Continue…..
 Derived attribute − example, average_salary in a
department should not be saved directly in the database,
instead it can be derived.
 For another example, age can be derived from
data_of_birth.
 Single-value attribute − Single-value attributes contain
single value. example −: Social_Security_Number.
 Multi-value attribute − Multi-value attributes may contain
more than one values.
 Example: a person can have more than one phone
number, email_address, etc.
Relationship
 The association among entities is called
relationship.
 Ex: Employee works_at department
 Ex: Student enrolls in a course
 Relationship Set
A set of relationships of similar type is called a
relationship set. Like entities, a relationship too
can have attributes. These attributes are
called descriptive attributes.
Mapping cardinalities
 Cardinality defines the number of entities in
one entity set, which can be associated with
the number of entities of other set via
relationship set.
 One to one
One to many
Many to one
Many to many
One to One
Entity set A Entity
set B
One to many
Entity set A Entity
set B
Many to one
Entity set A Entity
set B
Many to many
Entity set A Entity
set B
ER Diagram Representation
 Entity
 Attributes
Teacher Student Classes
Studen
t
Nam
e
Roll
Birth_Dat
e
ER Diagram Representation Continue…
 Composite
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
ER Diagram Representation Continue…
 Multivalued
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
Phone_No
ER Diagram Representation Continue…
 Derived
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
Phone_No
Age
ER Diagram Representation Continue…
 Relationship
 Binary Relationship and Cardinality
When two entities participate in a relationship then it
is called Binary Relationship.
Cardinality is the number of instance of an entity from
a relation that can be associated with the relation.
ER Diagram Representation Continue…
 One to One (1:1)
1 1
Example : Person – Passport
Student – Roll-No
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 One to Many (1:N)
1 N
Example : Mother- Children
Student - Address
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Many to One (N:1)
N 1
Example : Students - Teacher
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Many to One (M:N)
M N
Example : - Books - Authors
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Participation Constraint
Total participation Partial participation
Relationshi
p EntityEntity
 The ER Model has the power of expressing
database entities in a conceptual hierarchical
manner. As the hierarchy goes up, it generalizes
the view of entities, and as we go deep in the
hierarchy, it gives us the detail of every entity
included.
Going up in this structure is called Generalization
Reverse is called Specialization
Generalization and Specialization
Generalization
Pigeon
Birds
Peacoc
kSparrow
Specialization
Person
Teache
r
Student
IS A
Inheritance
Person
Nam
e
Gende
r
Birth_Dat
e
Teache
r
Student
EMP_IDRoll
IS A
Relational Data Model
 Relational data model is the primary data model,
which is used widely around the world for data
storage and processing.
 Concepts
 Touple
 Relation Instance
 Relation Schema
 Relation key
 Attribute domain
Key Constraints
 Key constraints
Primary Key
Foreign Key
Candidate Key
Alternate Key
Key Constraints ….
 Key constraints force that −
 in a relation with a key attribute, no two tuples can
have identical values for key attributes.
 a key attribute can not have NULL values.
 Domain constraints
 Every attribute is bound to have a specific range of values.
 Example : Age can not be negative
 Referential integrity constraints
Key Constraints ….
 Referential integrity constraints
Every relation has some conditions that must hold for
it to be a valid relation. These conditions are
called Relational Integrity Constraints.
I If a relation refers to a key attribute of a different or
same relation, then that key element must exist.
ER model to Relational Model
 ER model
 Entity
 Attributes
 Mapping Entity
 Create table for each entity.
 Entity's attributes should become fields of tables with their
respective data types.
 Declare primary key.
ER model to Relational Model
 Mapping Relationship
 Create table for a relationship.
 Add the primary keys of all participating Entities as
fields of table with their respective data types.
 If relationship has any attribute, add each attribute
as field of table.
 Declare a primary key composing all the primary
keys of participating entities.
 Declare all foreign key constraints.
ER model to Relational Model
 Mapping Weak entity set
 Create table for weak entity set.
 Add all its attributes to table as field.
 Add the primary key of identifying entity set.
 Declare all foreign key constraints.

More Related Content

What's hot

ER MODEL
ER MODELER MODEL
ER MODEL
Rupali Rana
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
Smriti Jain
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Data models
Data modelsData models
Data models
Usman Tariq
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
Bhandari Nawaraj
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
Shishir Aryal
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
Prabhu Goyal
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
Nishant Munjal
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
PadamNepal1
 
Generalization and specialization
Generalization and specializationGeneralization and specialization
Generalization and specialization
Knowledge Center Computer
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
VENNILAV6
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 

What's hot (20)

DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Data models
Data modelsData models
Data models
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
Generalization and specialization
Generalization and specializationGeneralization and specialization
Generalization and specialization
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 

Viewers also liked

How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagramTech_MX
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentationSopov Chan
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
DBMS topics for BCA
DBMS topics for BCADBMS topics for BCA
DBMS topics for BCA
Adbay
 
Library mangement-system
Library mangement-systemLibrary mangement-system
Library mangement-systemRafiul Rafi
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examplesRahul Khanwani
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
Jennifer Polack
 
School Management System
School Management SystemSchool Management System
School Management System
Northeastern University
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ARADHYAYANA
 
Time manipulation lecture 2
Time manipulation lecture 2Time manipulation lecture 2
Time manipulation lecture 2
Mudasir Syed
 
PHP mysql Er diagram
PHP mysql  Er diagramPHP mysql  Er diagram
PHP mysql Er diagram
Mudasir Syed
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
IIUM
 
Try PostgreSQL on linux
Try PostgreSQL on linuxTry PostgreSQL on linux
Try PostgreSQL on linux
Aey Unthika
 
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMsVanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne
 
Discrete Random Variable
Discrete Random VariableDiscrete Random Variable
Discrete Random Variable
Md Abdullah Al Mayin
 
00137
0013700137
00137
prashnant
 

Viewers also liked (20)

How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentation
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
DBMS topics for BCA
DBMS topics for BCADBMS topics for BCA
DBMS topics for BCA
 
Library mangement-system
Library mangement-systemLibrary mangement-system
Library mangement-system
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examples
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
 
School Management System
School Management SystemSchool Management System
School Management System
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
 
Time manipulation lecture 2
Time manipulation lecture 2Time manipulation lecture 2
Time manipulation lecture 2
 
PHP mysql Er diagram
PHP mysql  Er diagramPHP mysql  Er diagram
PHP mysql Er diagram
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
 
Erd cardinality
Erd cardinalityErd cardinality
Erd cardinality
 
Try PostgreSQL on linux
Try PostgreSQL on linuxTry PostgreSQL on linux
Try PostgreSQL on linux
 
Er diagram
Er diagramEr diagram
Er diagram
 
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMsVanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMs
 
Discrete Random Variable
Discrete Random VariableDiscrete Random Variable
Discrete Random Variable
 
00137
0013700137
00137
 
Mapping
MappingMapping
Mapping
 
02er
02er02er
02er
 

Similar to Er diagrams presentation

DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
parimala123
 
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 ..
Nimrakhan89
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
Knowledge Center Computer
 
Er Modeling
Er ModelingEr Modeling
Design issues with constraints of E-R model
Design issues with constraints of E-R modelDesign issues with constraints of E-R model
Design issues with constraints of E-R model
Paurav Shah
 
ERD.pptx
ERD.pptxERD.pptx
ERD.pptx
sarahabbas40
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
qwert001
 
Lecture one db
Lecture one dbLecture one db
Lecture one db
Huda Alameen
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
KameshwariPurusothma
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
DevidasBhere
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
TusharSingh711352
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
MANASINANDKISHORDEOR
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Mustafa Kamel Mohammadi
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
1ajnabi4u
 
Database
DatabaseDatabase
Database
mubeenkiran
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Science
drprkr74
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
Vijaykumar311275
 
Er model
Er modelEr model
Er model
Surkhab Shelly
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
Ramadan Babers, PhD
 

Similar to Er diagrams presentation (20)

DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
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 ..
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Design issues with constraints of E-R model
Design issues with constraints of E-R modelDesign issues with constraints of E-R model
Design issues with constraints of E-R model
 
ERD.pptx
ERD.pptxERD.pptx
ERD.pptx
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
 
Lecture one db
Lecture one dbLecture one db
Lecture one db
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
 
Database
DatabaseDatabase
Database
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Science
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
Er model
Er modelEr model
Er model
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 

Recently uploaded

How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 

Recently uploaded (20)

How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 

Er diagrams presentation

  • 2. To be discussed:-  Entity  Attribute  Types of Attribute  Relationship  ER Diagram Representation  Generalization  Specialization  Inheritance  Codd’s 12 Rule  Relational Data Model  ER Model to Relational Model
  • 3. Entity  An entity can be a real-world object, either animate or inanimate, that can be easily identifiable. Example : School Database  Teachers  Students  Classes  Courses offered Entity set  An entity set is a collection of similar types of entities. An entity set may contain entities with attribute sharing similar values.
  • 4. Attributes Entities are represented by means of their properties, called attributes. All attributes have values. Example : Student :- Name, Class, Age Types of Attributes  Simple attribute − Simple attributes are atomic values, which cannot be divided further. For example, a student's phone number is an atomic value of 10 digits.  Composite attribute − example, a student's complete name may have first_name and last_name.
  • 5. Types of Attributes Continue…..  Derived attribute − example, average_salary in a department should not be saved directly in the database, instead it can be derived.  For another example, age can be derived from data_of_birth.  Single-value attribute − Single-value attributes contain single value. example −: Social_Security_Number.  Multi-value attribute − Multi-value attributes may contain more than one values.  Example: a person can have more than one phone number, email_address, etc.
  • 6. Relationship  The association among entities is called relationship.  Ex: Employee works_at department  Ex: Student enrolls in a course  Relationship Set A set of relationships of similar type is called a relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes.
  • 7. Mapping cardinalities  Cardinality defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set.  One to one One to many Many to one Many to many
  • 8. One to One Entity set A Entity set B
  • 9. One to many Entity set A Entity set B
  • 10. Many to one Entity set A Entity set B
  • 11. Many to many Entity set A Entity set B
  • 12. ER Diagram Representation  Entity  Attributes Teacher Student Classes Studen t Nam e Roll Birth_Dat e
  • 13. ER Diagram Representation Continue…  Composite Studen t Nam e Roll Birth_Dat e Last First
  • 14. ER Diagram Representation Continue…  Multivalued Studen t Nam e Roll Birth_Dat e Last First Phone_No
  • 15. ER Diagram Representation Continue…  Derived Studen t Nam e Roll Birth_Dat e Last First Phone_No Age
  • 16. ER Diagram Representation Continue…  Relationship  Binary Relationship and Cardinality When two entities participate in a relationship then it is called Binary Relationship. Cardinality is the number of instance of an entity from a relation that can be associated with the relation.
  • 17. ER Diagram Representation Continue…  One to One (1:1) 1 1 Example : Person – Passport Student – Roll-No Relationshi p EntityEntity
  • 18. ER Diagram Representation Continue…  One to Many (1:N) 1 N Example : Mother- Children Student - Address Relationshi p EntityEntity
  • 19. ER Diagram Representation Continue…  Many to One (N:1) N 1 Example : Students - Teacher Relationshi p EntityEntity
  • 20. ER Diagram Representation Continue…  Many to One (M:N) M N Example : - Books - Authors Relationshi p EntityEntity
  • 21. ER Diagram Representation Continue…  Participation Constraint Total participation Partial participation Relationshi p EntityEntity
  • 22.  The ER Model has the power of expressing database entities in a conceptual hierarchical manner. As the hierarchy goes up, it generalizes the view of entities, and as we go deep in the hierarchy, it gives us the detail of every entity included. Going up in this structure is called Generalization Reverse is called Specialization Generalization and Specialization
  • 26. Relational Data Model  Relational data model is the primary data model, which is used widely around the world for data storage and processing.  Concepts  Touple  Relation Instance  Relation Schema  Relation key  Attribute domain
  • 27. Key Constraints  Key constraints Primary Key Foreign Key Candidate Key Alternate Key
  • 28. Key Constraints ….  Key constraints force that −  in a relation with a key attribute, no two tuples can have identical values for key attributes.  a key attribute can not have NULL values.  Domain constraints  Every attribute is bound to have a specific range of values.  Example : Age can not be negative  Referential integrity constraints
  • 29. Key Constraints ….  Referential integrity constraints Every relation has some conditions that must hold for it to be a valid relation. These conditions are called Relational Integrity Constraints. I If a relation refers to a key attribute of a different or same relation, then that key element must exist.
  • 30. ER model to Relational Model  ER model  Entity  Attributes  Mapping Entity  Create table for each entity.  Entity's attributes should become fields of tables with their respective data types.  Declare primary key.
  • 31. ER model to Relational Model  Mapping Relationship  Create table for a relationship.  Add the primary keys of all participating Entities as fields of table with their respective data types.  If relationship has any attribute, add each attribute as field of table.  Declare a primary key composing all the primary keys of participating entities.  Declare all foreign key constraints.
  • 32. ER model to Relational Model  Mapping Weak entity set  Create table for weak entity set.  Add all its attributes to table as field.  Add the primary key of identifying entity set.  Declare all foreign key constraints.