SlideShare a Scribd company logo
Introduction
 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.
Basic Terms
 An entity can be a real-world object, either animate or
inanimate, that can be easily identifiable.
 For example, in a school database, students, teachers,
classes, and courses offered can be considered as
entities.
 All these entities have some attributes or properties
that give them their identity
Basic Terms
 Entities are represented by means of their properties,
called attributes.
 All attributes have values.
 For example, a student entity may have name, class,
and age as attributes.
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 − Composite attributes are made of more than
one simple attribute. For example, a student's complete name may have
first_name and last_name.
 Derived attribute − Derived attributes are the attributes that do not
exist in the physical database, but their values are derived from other
attributes present in the database.
 For 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.
Types of Attributes
 Single-value attribute − Single-value attributes
contain single value.
 For example − Social_Security_Number.
 Multi-value attribute − Multi-value attributes may
contain more than one values.
 For example, a person can have more than one phone
number, email_address, etc.
Basic Terms
 Entity-Set and Keys
 Key is an attribute or collection of attributes that
uniquely identifies an entity among entity set.
 For example, the roll_number of a student makes
him/her identifiable among students.
 Super Key − A set of attributes (one or more) that
collectively identifies an entity in an entity set.
Basic Terms
 Candidate Key − A minimal super key is called a
candidate key. An entity set may have more than one
candidate key.
 Primary Key − A primary key is one of the candidate
keys chosen by the database designer to uniquely
identify the entity set.
Basic Terms
 Relationship
 The association among entities is called a relationship.
 For example, an employee works_ata department, a
student enrolls in a course. Here, Works_at and
Enrolls are called relationships.
Basic Terms
 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.
Basic Terms
 Degree of Relationship
 The number of participating entities in a relationship
defines the degree of the relationship.
 Binary = degree 2
 Ternary = degree 3
 n-ary
Basic Terms
 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.
Basic Terms
Basic Terms
Basic Terms
Basic Terms
ER Representation
ER Representation
ER Representation
ER Representation
ER Representation
ER Representation
ER Representation
ER Representation
ER Representation
Weak and Strong Entity
 A weak entity is an entity that depends on the existence of
another entity. In more technical terms it can defined as an
entity that cannot be identified by its own attributes.
 It uses a foreign key combined with its attributed to form the
primary key.
 An entity like order item is a good example for this.
 The order item will be meaningless without an order so it
depends on the existence of order.
Weak and Strong Entity
Weak and Strong Entity
 An entity set that has a primary key is called as Strong
entity set.
 Consider an entity set Payment which has three
attributes: payment_number, payment_date and
payment_amount.
 Although each payment entity is distinct but payment
for different loans may share the same payment
number. Thus, this entity set does not have a primary
key and it is an entity set
Weak and Strong Entity
 A weak entity set does not have a primary key but we
need a means of distinguishing among all those
entries in the entity set that depend on one particular
strong entity set.
 The discriminator of a weak entity set is a set of
attributes that allows this distinction be made.
 For example, payment_number acts as discriminator
for payment entity set.
Weak and Strong Entity
 A member of a strong entity set is called dominant
entity and member of weak entity set is called as
subordinate entity.
Weak and Strong Entity
Total and Partial Participation
Total and Partial Participation
 Relationships between entities can be optional or
compulsory.
 In our example, we could decide that a person is considered
to be a customer only if they have bought a product.
 On the other hand, we could say that a customer is a person
whom we know about and whom we hope might buy
something—that is, we can have people listed as customers
in our database who never buy a product
Total and Partial Participation
 In the first case, the customer entity has total
participation in the bought relationship (all customers
have bought a product, and we can’t have
a customer who hasn’t bought a product), while in the
second case it has partial participation (a customer can
buy a product).
 These are referred to as the participation constraints of
the relationship.
Total and Partial Participation
 Employee head of department
 Not all employees become a head, but department will
always be headed by one employee.
 So employee participated partially in relationship.
Roles
Example of ER Diagram
 In case of college, a college contain many departments
 Each dept. can offer any number of courses
 Many instructor can work in a dept.
 An instructor can work only in one dept.
 For each dept. there is head
 An instructor can be head of only one dept.
 Each instructor can take any no. of courses
 A course can be taken by only one instructor
 A student can enroll for any no. of courses
 Each course can have any no. of students
Example of ER Diagram
 Step 1 : Identify the Entities
What are the entities here?
 From the statements given, the entities are
 Department
 Course
 Instructor
 Student
Example of ER Diagram
 Step 2 : Identify the relationships
 One department offers many courses. But one particular course can be
offered by only one department. hence the cardinality between
department and course is One to Many (1:N)
 One department has multiple instructors . But instructor belongs to
only one department. Hence the cardinality between department and
instructor is One to Many (1:N)
 One department has only one head and one head can be the head of
only one department. Hence the cardinality is one to one. (1:1)
 One course can be enrolled by many students and one student can
enroll for many courses. Hence the cardinality between course and
student is Many to Many (M:N)
 One course is taught by only one instructor. But one instructor teaches
many courses. Hence the cardinality between course and instructor is
Many to One (N :1)
Example of ER Diagram
 Step 3: Identify the key attributes
 "Departmen_Name" can identify a department
uniquely. Hence Department_Name is the key
attribute for the Entity "Department".
 Course_ID is the key attribute for "Course" Entity.
 Student_ID is the key attribute for "Student" Entity.
 Instructor_ID is the key attribute for "Instructor"
Entity.
Example of ER Diagram
 Step 4: Identify other relevant attributes
 For the department entity, other attributes are location
 For course entity, other attributes are
course_name,duration
 For instructor entity, other attributes are first_name,
last_name, phone
 For student entity, first_name, last_name, phone
Example of ER Diagram
Generalization
Example
Specialization
Specialization
Aggregation
 Aggregation is a process when relation between two
entity is treated as a single entity.
 Here the relation between Center and Course, is acting
as an Entity in relation with Visitor.
Aggregation
Aggregation
 The E-R model cannot express relationships among
relationships.
 When would we need such a thing?
 Consider a DB with information about employees who
work on a particular project and use a number of
machines doing that work.
Aggregation
Aggregation
 Relationship sets work and uses could be combined into a
single set. However, they shouldn't be, as this would
obscure the logical structure of this scheme.
 The solution is to use aggregation.
 An abstraction through which relationships are treated as
higher-level entities.
 For our example, we treat the relationship set work and the
entity sets employee and project as a higher-level entity
set called work.
Aggregation

More Related Content

What's hot

ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Er diagram
Er diagramEr diagram
Er diagram
Sabana Maharjan
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
Kevin Jadiya
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
Visakh V
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Shakila Mahjabin
 
ER diagram powerpoint
ER diagram powerpointER diagram powerpoint
ER diagram powerpoint
Steffi Libarios
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Rakhi Mukherji
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
DBMS UNIT1
DBMS UNIT1DBMS UNIT1
DBMS UNIT1
CHANDRA BHUSHAN
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
Prasanna Kumar SM
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
Nishant Munjal
 
Codd's rules
Codd's rulesCodd's rules
Codd's rulesMohd Arif
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
Mustafa Kamel Mohammadi
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
Bhandari Nawaraj
 

What's hot (20)

ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Er diagram
Er diagramEr diagram
Er diagram
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
ER diagram powerpoint
ER diagram powerpointER diagram powerpoint
ER diagram powerpoint
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
DBMS UNIT1
DBMS UNIT1DBMS UNIT1
DBMS UNIT1
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
 
Codd's rules
Codd's rulesCodd's rules
Codd's rules
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 

Similar to Er model

E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
sandeep54552
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
KameshwariPurusothma
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
parimala123
 
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
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
DevidasBhere
 
Er Modeling
Er ModelingEr Modeling
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
Arnav Chowdhury
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
1ajnabi4u
 
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
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
qwert001
 
Database
DatabaseDatabase
Database
mubeenkiran
 
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
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
prosofts1
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
VisnuDharsini
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
Ajit Nayak
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
ironman82715
 

Similar to Er model (20)

E r model
E r modelE r model
E r model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
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
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
 
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...
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
 
database
databasedatabase
database
 
Database
DatabaseDatabase
Database
 
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
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
 

More from Soumyajit Dutta

Normalisation
NormalisationNormalisation
Normalisation
Soumyajit Dutta
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Soumyajit Dutta
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functions
Soumyajit Dutta
 
Transaction processing
Transaction processingTransaction processing
Transaction processing
Soumyajit Dutta
 
Single row functions
Single row functionsSingle row functions
Single row functions
Soumyajit Dutta
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
Soumyajit Dutta
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
Soumyajit Dutta
 
Computer Organisation Design
Computer Organisation DesignComputer Organisation Design
Computer Organisation Design
Soumyajit Dutta
 

More from Soumyajit Dutta (8)

Normalisation
NormalisationNormalisation
Normalisation
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functions
 
Transaction processing
Transaction processingTransaction processing
Transaction processing
 
Single row functions
Single row functionsSingle row functions
Single row functions
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Computer Organisation Design
Computer Organisation DesignComputer Organisation Design
Computer Organisation Design
 

Recently uploaded

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
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir 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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
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.
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
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
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
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
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
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
 
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
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

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
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .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
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
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
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
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
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
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.
 
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
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Er model

  • 1.
  • 2. Introduction  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.
  • 3. Basic Terms  An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.  For example, in a school database, students, teachers, classes, and courses offered can be considered as entities.  All these entities have some attributes or properties that give them their identity
  • 4. Basic Terms  Entities are represented by means of their properties, called attributes.  All attributes have values.  For example, a student entity may have name, class, and age as attributes.
  • 5. 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 − Composite attributes are made of more than one simple attribute. For example, a student's complete name may have first_name and last_name.  Derived attribute − Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database.  For 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.
  • 6. Types of Attributes  Single-value attribute − Single-value attributes contain single value.  For example − Social_Security_Number.  Multi-value attribute − Multi-value attributes may contain more than one values.  For example, a person can have more than one phone number, email_address, etc.
  • 7. Basic Terms  Entity-Set and Keys  Key is an attribute or collection of attributes that uniquely identifies an entity among entity set.  For example, the roll_number of a student makes him/her identifiable among students.  Super Key − A set of attributes (one or more) that collectively identifies an entity in an entity set.
  • 8. Basic Terms  Candidate Key − A minimal super key is called a candidate key. An entity set may have more than one candidate key.  Primary Key − A primary key is one of the candidate keys chosen by the database designer to uniquely identify the entity set.
  • 9. Basic Terms  Relationship  The association among entities is called a relationship.  For example, an employee works_ata department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships.
  • 10. Basic Terms  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.
  • 11. Basic Terms  Degree of Relationship  The number of participating entities in a relationship defines the degree of the relationship.  Binary = degree 2  Ternary = degree 3  n-ary
  • 12. Basic Terms  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.
  • 26. Weak and Strong Entity  A weak entity is an entity that depends on the existence of another entity. In more technical terms it can defined as an entity that cannot be identified by its own attributes.  It uses a foreign key combined with its attributed to form the primary key.  An entity like order item is a good example for this.  The order item will be meaningless without an order so it depends on the existence of order.
  • 27. Weak and Strong Entity
  • 28. Weak and Strong Entity  An entity set that has a primary key is called as Strong entity set.  Consider an entity set Payment which has three attributes: payment_number, payment_date and payment_amount.  Although each payment entity is distinct but payment for different loans may share the same payment number. Thus, this entity set does not have a primary key and it is an entity set
  • 29. Weak and Strong Entity  A weak entity set does not have a primary key but we need a means of distinguishing among all those entries in the entity set that depend on one particular strong entity set.  The discriminator of a weak entity set is a set of attributes that allows this distinction be made.  For example, payment_number acts as discriminator for payment entity set.
  • 30. Weak and Strong Entity  A member of a strong entity set is called dominant entity and member of weak entity set is called as subordinate entity.
  • 31. Weak and Strong Entity
  • 32. Total and Partial Participation
  • 33. Total and Partial Participation  Relationships between entities can be optional or compulsory.  In our example, we could decide that a person is considered to be a customer only if they have bought a product.  On the other hand, we could say that a customer is a person whom we know about and whom we hope might buy something—that is, we can have people listed as customers in our database who never buy a product
  • 34. Total and Partial Participation  In the first case, the customer entity has total participation in the bought relationship (all customers have bought a product, and we can’t have a customer who hasn’t bought a product), while in the second case it has partial participation (a customer can buy a product).  These are referred to as the participation constraints of the relationship.
  • 35. Total and Partial Participation  Employee head of department  Not all employees become a head, but department will always be headed by one employee.  So employee participated partially in relationship.
  • 36. Roles
  • 37. Example of ER Diagram  In case of college, a college contain many departments  Each dept. can offer any number of courses  Many instructor can work in a dept.  An instructor can work only in one dept.  For each dept. there is head  An instructor can be head of only one dept.  Each instructor can take any no. of courses  A course can be taken by only one instructor  A student can enroll for any no. of courses  Each course can have any no. of students
  • 38. Example of ER Diagram  Step 1 : Identify the Entities What are the entities here?  From the statements given, the entities are  Department  Course  Instructor  Student
  • 39. Example of ER Diagram  Step 2 : Identify the relationships  One department offers many courses. But one particular course can be offered by only one department. hence the cardinality between department and course is One to Many (1:N)  One department has multiple instructors . But instructor belongs to only one department. Hence the cardinality between department and instructor is One to Many (1:N)  One department has only one head and one head can be the head of only one department. Hence the cardinality is one to one. (1:1)  One course can be enrolled by many students and one student can enroll for many courses. Hence the cardinality between course and student is Many to Many (M:N)  One course is taught by only one instructor. But one instructor teaches many courses. Hence the cardinality between course and instructor is Many to One (N :1)
  • 40. Example of ER Diagram  Step 3: Identify the key attributes  "Departmen_Name" can identify a department uniquely. Hence Department_Name is the key attribute for the Entity "Department".  Course_ID is the key attribute for "Course" Entity.  Student_ID is the key attribute for "Student" Entity.  Instructor_ID is the key attribute for "Instructor" Entity.
  • 41. Example of ER Diagram  Step 4: Identify other relevant attributes  For the department entity, other attributes are location  For course entity, other attributes are course_name,duration  For instructor entity, other attributes are first_name, last_name, phone  For student entity, first_name, last_name, phone
  • 42. Example of ER Diagram
  • 47. Aggregation  Aggregation is a process when relation between two entity is treated as a single entity.  Here the relation between Center and Course, is acting as an Entity in relation with Visitor.
  • 49. Aggregation  The E-R model cannot express relationships among relationships.  When would we need such a thing?  Consider a DB with information about employees who work on a particular project and use a number of machines doing that work.
  • 51. Aggregation  Relationship sets work and uses could be combined into a single set. However, they shouldn't be, as this would obscure the logical structure of this scheme.  The solution is to use aggregation.  An abstraction through which relationships are treated as higher-level entities.  For our example, we treat the relationship set work and the entity sets employee and project as a higher-level entity set called work.