SlideShare a Scribd company logo
Organization of this Chapter:
• Introduction
• Superclasses and Subclasses
• Specialization and Generalization
• Constraints on specialization/generalization
• Aggregation and Composition
• Sample example
February 21, 2025 1
Enhanced ER Model
• The Enhanced ER model, EER model, includes all the
modeling concepts of ER model along with some additional
concepts like super class and sub class, specialization,
generalization, aggregation, and composition.
• Super class and Sub class:
– Super class is an entity type that has a relationship with one
or more subtypes. On the other hand, Sub class is a group
of entities with unique attributes.
– Sub class inherits properties and attributes from its super
class. Sub class and Super class relationship leads the
concept of Inheritance.
– The relationship between sub class and super class is
denoted with d symbol, where d means disjointness.
February 21, 2025 2
contd..
February 21, 2025 3
Specialization and Generalization
• Specialization
– The process of designating sub groupings within
an entity set is called Specialization.
– An entity set may be specialized by more than one
distinguishing features.
– ER-design, specialization is depicted by an
Inverted Triangle component labeled “IS A” (is a).
– Specialization can be repeatedly used to refine a
ER design.
February 21, 2025 4
contd..
February 21, 2025 5
Generalization
• Generalization is the process of combining similar entities into a
more generalized entity.
• It allows for the abstraction of common properties and relationships
shared by multiple entities into a single higher-level entity. This
process moves from specific to general.
• Purpose: Simplifies the data model by grouping common features
into a generalized (parent) entity, avoiding redundancy.
• Hierarchy: Generalization forms a bottom-up hierarchy, where
several lower-level entities are abstracted into a higher-level
generalized entity.
February 21, 2025 6
EER Model (contd..)
• Generalization:
– Generalization is a simple inversion of specialization. It is
the process of extracting common properties from a set of
entity types and creating a generalized entity type from it.
– It is a bottom-up approach in which two or more entitiy
types can be generalized to a higher level entity type, if
they have some attributes in common.
– Specialization adopts top-down approach, while
Generalization adopts bottom-up approach.
– A crucial property of the higher-level and lower-level
entities created by specialization and generalization is
attribute inheritance.
– A lower-level entity set (or subclass) also inherits
participation in the relationship sets in which its higher-
level entity (or superclass) participates
February 21, 2025 7
contd..
February 21, 2025 8
• Construct an ER diagram for the following:
• “A university maintains record of students
and the programmes in which they have
enrolled. It stores the student name, id ,
phone no, address of student and
programme code ,programme name and
duration. A student is either full time or part
time student(only one of the types). A
student can register for multiple
prgrammmes and vice versa.”
February 21, 2025 9
Steps to draw ER diagram
• An Entity-Relationship (ER) diagram is used to
visually represent the structure of a database. It
shows entities, relationships, and the attributes
that describe them. Here’s a step-by-step guide
to draw an ER diagram:
• Identify Entities
• Entities are objects or concepts about which
data is stored. These could be things like
"Customer," "Order," or "Product."
• Entities are typically represented by rectangles.
February 21, 2025 10
• Identify Relationships
• A relationship is a connection between two or
more entities. For example, a "Customer" can
"Place" an "Order."
• Relationships are shown using diamonds or
lines connecting entities.
• Example:
• "Customer" places "Order" (relationship: places)
February 21, 2025 11
• Determine the Cardinality of Relationships
• Cardinality defines how entities relate to each other (e.g.,
one-to-one, one-to-many, many-to-many).
• Use notations like "1" or "M" to specify cardinality. For
example, one customer can place many orders (1 to M
relationship).
• Example:
• 1 Customer places M Orders
February 21, 2025 12
• Add Attributes
• Attributes provide more details about each entity (e.g.,
"Customer Name," "Order Date").
• Attributes are represented by ovals connected to their
respective entity rectangles.
• Example:
• Attributes of "Customer": CustomerID, CustomerName,
Email
• Attributes of "Order": OrderID, OrderDate, TotalAmount
February 21, 2025 13
• Identify Primary Keys
• Each entity should have a primary key, a unique identifier
for each record in that entity
• Define Foreign Keys (if any)
• Foreign keys establish links between related entities. For
example, "Order" might have a foreign key "CustomerID"
that links it back to the "Customer" entity.
• Example:
• The "Order" entity could have a "CustomerID" attribute,
which is a foreign key from the "Customer" entity.
February 21, 2025 14
• Normalize the Diagram (Optional)
• Review your diagram to ensure that there
is no redundancy or unnecessary
relationships.
• Normalize the design to avoid data
duplication.
February 21, 2025 15
Constraints in Generalization:
• Loss of Specificity: By generalizing, you may lose
some specific characteristics of individual entities in the
higher-level abstraction
• Design Complexity: While generalization reduces
redundancy, it may increase the complexity of
relationships and hierarchy in the database schema.
• .
February 21, 2025 16
Constraints on Generalization/Specialization
• Membership Constraint
– Condition defined/Attribute defined
• All the lower level entity is identified on the basis of same type of
attribute this type of generalization is said to be attribute defined.
– Here the lower level entity is generalized on the basis
of accnt type.
February 21, 2025 17
Accnt no Accnt name Branch Accnt type
005 a1 Ambala Saving a
008 a2 chandigarh Current a
009 a3 mohali Saving a
– User-defined
• User-defined lower-level entity sets are not constrained by a
membership condition; rather, the database user assigns entities to a
given entity set.
• EX: A celebrity can be personalised into actor and politician.
• Disjoint constraints
– Disjoint:
• The disjoint constraint only applies when a superclass has more
than one subclass. If the subclasses are disjoint, then an entity
occurrence can be a member of only one of the subclasses .e.g.
postgrads or undergrads; one cannot be both.
• To represent a disjoint superclass/subclass relationship, Or is used.
February 21, 2025 18
contd..
• Overlapping: This applies when an entity occurrence may be a
member of more than one subclass, e.g. student and staff; some
people are both. And is used to represent the overlapping
specialization/generalization relationship in the ER diagram.
February 21, 2025 19
contd..
• Completeness constraints
– Total: Each superclass (higher-level entity) must belong to
subclasses (lower-level entity sets), e.g. a student must be
postgrad or undergrad. To represent completeness in the
specialization/generalization relationship, the keyword
Mandatory is used.
February 21, 2025 20
contd..
• Partial: Some superclasses may not belong to subclasses
(lower-level entity sets), e.g. some people at UCT are neither
student nor staff. The keyword Optional is used to represent a
partial specialization/generalization relationship.
February 21, 2025 21
Aggregation and Composition
• Aggregation:
– Aggregation represents a has-a relationship between entity types,
where one represents the whole and the other the part.
– An example of aggregation is the Car and Engine entities. A car is
made up of an engine. The car is the whole and the engine is the part.
– Aggregation does not represent strong ownership. This means, a part
can exist on its own without the whole. There is no stronger ownership
between a car and the engine. An engine of a car can be moved to
another car.
– A line with a diamond at the end is used to represent aggregation.The
whole must be put at the end of the diamond.
February 21, 2025 22
contd..
• Composition
– Composition is a form of aggregation that represents an
association between entities, where there is a strong
ownership between the whole and the part.
– For example,: a tree and a branch have a composition
relationship. A branch is 'part' of a 'whole' tree - we cannot
cut the branch and add it to another tree.
– A line with a filled diamond at the end is used to represent
composition where the diamond side is towards the part
side.
February 21, 2025 23
An Example
February 21, 2025 24
Ad

Recommended

Chapter-4 Enhanced ER Model
Chapter-4 Enhanced ER Model
Kunal Anand
 
Database Management System DBMS ER diagram.
Database Management System DBMS ER diagram.
MdAbdullahAlMamun122875
 
dataabase administration for computer cs
dataabase administration for computer cs
danieltilay38
 
Data Modeling - Enhanced ER diagrams & Mapping.pdf
Data Modeling - Enhanced ER diagrams & Mapping.pdf
Christalin Nelson
 
UML Training for Business Analysts
UML Training for Business Analysts
SwatiS-BA
 
Introduction to UML
Introduction to UML
SwatiS-BA
 
Introduction to OOA and UML
Introduction to OOA and UML
Veneet-BA
 
Introduction to OOA and UML
Introduction to OOA and UML
Veneet-BA
 
Introduction to OOA and UML
Introduction to OOA and UML
Shwetha-BA
 
chapter 1: Specialization and Generalization.pptx
chapter 1: Specialization and Generalization.pptx
bharatgautam204
 
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
EliasPetros
 
dbms ppt parul university dbms course for
dbms ppt parul university dbms course for
VaibhavSrivastav52
 
Introduction to OOA and UML - Part 1
Introduction to OOA and UML - Part 1
Shwetha-BA
 
UML Introduction The system development life cycle (SDLC) is a complex projec...
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
UML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Generalization and Specilaization cfdg.ppt
Generalization and Specilaization cfdg.ppt
pooja569725
 
Slideshow on the notes of software engineering
Slideshow on the notes of software engineering
erickbaldskie
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
Kunal Anand
 
UML constructs
UML constructs
Dawood Faheem Abbasi
 
TEST PPT
TEST PPT
berryzed
 
Grasp principles
Grasp principles
Yuriy Shapovalov
 
3_EERD.pdf
3_EERD.pdf
LPhct2
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
Structural modeling and analysis
Structural modeling and analysis
JIGAR MAKHIJA
 
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
yadavdkshitij2003
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Lecture#01, object orientation
Lecture#01, object orientation
babak danyal
 
stack in python using different datatypes.pptx
stack in python using different datatypes.pptx
urvashipundir04
 
Game Playing in Artificial intelligence.pptx
Game Playing in Artificial intelligence.pptx
urvashipundir04
 

More Related Content

Similar to extended modelling in dbms using different.pptx (20)

Introduction to OOA and UML
Introduction to OOA and UML
Shwetha-BA
 
chapter 1: Specialization and Generalization.pptx
chapter 1: Specialization and Generalization.pptx
bharatgautam204
 
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
EliasPetros
 
dbms ppt parul university dbms course for
dbms ppt parul university dbms course for
VaibhavSrivastav52
 
Introduction to OOA and UML - Part 1
Introduction to OOA and UML - Part 1
Shwetha-BA
 
UML Introduction The system development life cycle (SDLC) is a complex projec...
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
UML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Generalization and Specilaization cfdg.ppt
Generalization and Specilaization cfdg.ppt
pooja569725
 
Slideshow on the notes of software engineering
Slideshow on the notes of software engineering
erickbaldskie
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
Kunal Anand
 
UML constructs
UML constructs
Dawood Faheem Abbasi
 
TEST PPT
TEST PPT
berryzed
 
Grasp principles
Grasp principles
Yuriy Shapovalov
 
3_EERD.pdf
3_EERD.pdf
LPhct2
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
Structural modeling and analysis
Structural modeling and analysis
JIGAR MAKHIJA
 
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
yadavdkshitij2003
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Lecture#01, object orientation
Lecture#01, object orientation
babak danyal
 
Introduction to OOA and UML
Introduction to OOA and UML
Shwetha-BA
 
chapter 1: Specialization and Generalization.pptx
chapter 1: Specialization and Generalization.pptx
bharatgautam204
 
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
lkjhlkjhjhkjhlkjhkjhkjhkjhkjhkjhjhkjh.ppt
EliasPetros
 
dbms ppt parul university dbms course for
dbms ppt parul university dbms course for
VaibhavSrivastav52
 
Introduction to OOA and UML - Part 1
Introduction to OOA and UML - Part 1
Shwetha-BA
 
UML Introduction The system development life cycle (SDLC) is a complex projec...
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
Generalization and Specilaization cfdg.ppt
Generalization and Specilaization cfdg.ppt
pooja569725
 
Slideshow on the notes of software engineering
Slideshow on the notes of software engineering
erickbaldskie
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
Kunal Anand
 
3_EERD.pdf
3_EERD.pdf
LPhct2
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
Structural modeling and analysis
Structural modeling and analysis
JIGAR MAKHIJA
 
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
yadavdkshitij2003
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Entity Relationship Diagram Concept.pptx
Entity Relationship Diagram Concept.pptx
sastradipraja
 
Lecture#01, object orientation
Lecture#01, object orientation
babak danyal
 

More from urvashipundir04 (20)

stack in python using different datatypes.pptx
stack in python using different datatypes.pptx
urvashipundir04
 
Game Playing in Artificial intelligence.pptx
Game Playing in Artificial intelligence.pptx
urvashipundir04
 
PRODUCTION SYSTEM in data science .pptx
PRODUCTION SYSTEM in data science .pptx
urvashipundir04
 
Presentation1 in datamining using techn.pptx
Presentation1 in datamining using techn.pptx
urvashipundir04
 
Dependency modelling in data mining.pptx
Dependency modelling in data mining.pptx
urvashipundir04
 
INTRODUCTION to datawarehouse IN DATA.pptx
INTRODUCTION to datawarehouse IN DATA.pptx
urvashipundir04
 
SOCIAL NETWORK ANALYISI in engeenireg.pptx
SOCIAL NETWORK ANALYISI in engeenireg.pptx
urvashipundir04
 
datamining in engerring using different techniques.pptx
datamining in engerring using different techniques.pptx
urvashipundir04
 
datamining IN Artificial intelligence.pptx
datamining IN Artificial intelligence.pptx
urvashipundir04
 
Underfitting and Overfitting in Machine Learning.pptx
Underfitting and Overfitting in Machine Learning.pptx
urvashipundir04
 
introduction values and best practices in
introduction values and best practices in
urvashipundir04
 
ppt on different topics of circular.pptx
ppt on different topics of circular.pptx
urvashipundir04
 
list in python and traversal of list.pptx
list in python and traversal of list.pptx
urvashipundir04
 
ermodelN in database management system.ppt
ermodelN in database management system.ppt
urvashipundir04
 
libraries in python using different .pptx
libraries in python using different .pptx
urvashipundir04
 
tuple in python is an impotant topic.pptx
tuple in python is an impotant topic.pptx
urvashipundir04
 
ANIMATION in computer graphics using 3 D.pptx
ANIMATION in computer graphics using 3 D.pptx
urvashipundir04
 
dispaly subroutines in computer graphics .pptx
dispaly subroutines in computer graphics .pptx
urvashipundir04
 
loopin gstatement in python using .pptx
loopin gstatement in python using .pptx
urvashipundir04
 
primitives in computer graphics using .pptx
primitives in computer graphics using .pptx
urvashipundir04
 
stack in python using different datatypes.pptx
stack in python using different datatypes.pptx
urvashipundir04
 
Game Playing in Artificial intelligence.pptx
Game Playing in Artificial intelligence.pptx
urvashipundir04
 
PRODUCTION SYSTEM in data science .pptx
PRODUCTION SYSTEM in data science .pptx
urvashipundir04
 
Presentation1 in datamining using techn.pptx
Presentation1 in datamining using techn.pptx
urvashipundir04
 
Dependency modelling in data mining.pptx
Dependency modelling in data mining.pptx
urvashipundir04
 
INTRODUCTION to datawarehouse IN DATA.pptx
INTRODUCTION to datawarehouse IN DATA.pptx
urvashipundir04
 
SOCIAL NETWORK ANALYISI in engeenireg.pptx
SOCIAL NETWORK ANALYISI in engeenireg.pptx
urvashipundir04
 
datamining in engerring using different techniques.pptx
datamining in engerring using different techniques.pptx
urvashipundir04
 
datamining IN Artificial intelligence.pptx
datamining IN Artificial intelligence.pptx
urvashipundir04
 
Underfitting and Overfitting in Machine Learning.pptx
Underfitting and Overfitting in Machine Learning.pptx
urvashipundir04
 
introduction values and best practices in
introduction values and best practices in
urvashipundir04
 
ppt on different topics of circular.pptx
ppt on different topics of circular.pptx
urvashipundir04
 
list in python and traversal of list.pptx
list in python and traversal of list.pptx
urvashipundir04
 
ermodelN in database management system.ppt
ermodelN in database management system.ppt
urvashipundir04
 
libraries in python using different .pptx
libraries in python using different .pptx
urvashipundir04
 
tuple in python is an impotant topic.pptx
tuple in python is an impotant topic.pptx
urvashipundir04
 
ANIMATION in computer graphics using 3 D.pptx
ANIMATION in computer graphics using 3 D.pptx
urvashipundir04
 
dispaly subroutines in computer graphics .pptx
dispaly subroutines in computer graphics .pptx
urvashipundir04
 
loopin gstatement in python using .pptx
loopin gstatement in python using .pptx
urvashipundir04
 
primitives in computer graphics using .pptx
primitives in computer graphics using .pptx
urvashipundir04
 
Ad

Recently uploaded (20)

FSE-Journal-First-Automated code editing with search-generate-modify.pdf
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
Comparison of Flexible and Rigid Pavements in Bangladesh
Comparison of Flexible and Rigid Pavements in Bangladesh
Arifur Rahman
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
輪読会資料_Miipher and Miipher2 .
輪読会資料_Miipher and Miipher2 .
NABLAS株式会社
 
20CE404-Soil Mechanics - Slide Share PPT
20CE404-Soil Mechanics - Slide Share PPT
saravananr808639
 
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
 
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
 
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
 
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Abraham Silberschatz-Operating System Concepts (9th,2012.12).pdf
Shabista Imam
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
Comparison of Flexible and Rigid Pavements in Bangladesh
Comparison of Flexible and Rigid Pavements in Bangladesh
Arifur Rahman
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
輪読会資料_Miipher and Miipher2 .
輪読会資料_Miipher and Miipher2 .
NABLAS株式会社
 
20CE404-Soil Mechanics - Slide Share PPT
20CE404-Soil Mechanics - Slide Share PPT
saravananr808639
 
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
 
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
 
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
 
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
Ad

extended modelling in dbms using different.pptx

  • 1. Organization of this Chapter: • Introduction • Superclasses and Subclasses • Specialization and Generalization • Constraints on specialization/generalization • Aggregation and Composition • Sample example February 21, 2025 1
  • 2. Enhanced ER Model • The Enhanced ER model, EER model, includes all the modeling concepts of ER model along with some additional concepts like super class and sub class, specialization, generalization, aggregation, and composition. • Super class and Sub class: – Super class is an entity type that has a relationship with one or more subtypes. On the other hand, Sub class is a group of entities with unique attributes. – Sub class inherits properties and attributes from its super class. Sub class and Super class relationship leads the concept of Inheritance. – The relationship between sub class and super class is denoted with d symbol, where d means disjointness. February 21, 2025 2
  • 4. Specialization and Generalization • Specialization – The process of designating sub groupings within an entity set is called Specialization. – An entity set may be specialized by more than one distinguishing features. – ER-design, specialization is depicted by an Inverted Triangle component labeled “IS A” (is a). – Specialization can be repeatedly used to refine a ER design. February 21, 2025 4
  • 6. Generalization • Generalization is the process of combining similar entities into a more generalized entity. • It allows for the abstraction of common properties and relationships shared by multiple entities into a single higher-level entity. This process moves from specific to general. • Purpose: Simplifies the data model by grouping common features into a generalized (parent) entity, avoiding redundancy. • Hierarchy: Generalization forms a bottom-up hierarchy, where several lower-level entities are abstracted into a higher-level generalized entity. February 21, 2025 6
  • 7. EER Model (contd..) • Generalization: – Generalization is a simple inversion of specialization. It is the process of extracting common properties from a set of entity types and creating a generalized entity type from it. – It is a bottom-up approach in which two or more entitiy types can be generalized to a higher level entity type, if they have some attributes in common. – Specialization adopts top-down approach, while Generalization adopts bottom-up approach. – A crucial property of the higher-level and lower-level entities created by specialization and generalization is attribute inheritance. – A lower-level entity set (or subclass) also inherits participation in the relationship sets in which its higher- level entity (or superclass) participates February 21, 2025 7
  • 9. • Construct an ER diagram for the following: • “A university maintains record of students and the programmes in which they have enrolled. It stores the student name, id , phone no, address of student and programme code ,programme name and duration. A student is either full time or part time student(only one of the types). A student can register for multiple prgrammmes and vice versa.” February 21, 2025 9
  • 10. Steps to draw ER diagram • An Entity-Relationship (ER) diagram is used to visually represent the structure of a database. It shows entities, relationships, and the attributes that describe them. Here’s a step-by-step guide to draw an ER diagram: • Identify Entities • Entities are objects or concepts about which data is stored. These could be things like "Customer," "Order," or "Product." • Entities are typically represented by rectangles. February 21, 2025 10
  • 11. • Identify Relationships • A relationship is a connection between two or more entities. For example, a "Customer" can "Place" an "Order." • Relationships are shown using diamonds or lines connecting entities. • Example: • "Customer" places "Order" (relationship: places) February 21, 2025 11
  • 12. • Determine the Cardinality of Relationships • Cardinality defines how entities relate to each other (e.g., one-to-one, one-to-many, many-to-many). • Use notations like "1" or "M" to specify cardinality. For example, one customer can place many orders (1 to M relationship). • Example: • 1 Customer places M Orders February 21, 2025 12
  • 13. • Add Attributes • Attributes provide more details about each entity (e.g., "Customer Name," "Order Date"). • Attributes are represented by ovals connected to their respective entity rectangles. • Example: • Attributes of "Customer": CustomerID, CustomerName, Email • Attributes of "Order": OrderID, OrderDate, TotalAmount February 21, 2025 13
  • 14. • Identify Primary Keys • Each entity should have a primary key, a unique identifier for each record in that entity • Define Foreign Keys (if any) • Foreign keys establish links between related entities. For example, "Order" might have a foreign key "CustomerID" that links it back to the "Customer" entity. • Example: • The "Order" entity could have a "CustomerID" attribute, which is a foreign key from the "Customer" entity. February 21, 2025 14
  • 15. • Normalize the Diagram (Optional) • Review your diagram to ensure that there is no redundancy or unnecessary relationships. • Normalize the design to avoid data duplication. February 21, 2025 15
  • 16. Constraints in Generalization: • Loss of Specificity: By generalizing, you may lose some specific characteristics of individual entities in the higher-level abstraction • Design Complexity: While generalization reduces redundancy, it may increase the complexity of relationships and hierarchy in the database schema. • . February 21, 2025 16
  • 17. Constraints on Generalization/Specialization • Membership Constraint – Condition defined/Attribute defined • All the lower level entity is identified on the basis of same type of attribute this type of generalization is said to be attribute defined. – Here the lower level entity is generalized on the basis of accnt type. February 21, 2025 17 Accnt no Accnt name Branch Accnt type 005 a1 Ambala Saving a 008 a2 chandigarh Current a 009 a3 mohali Saving a
  • 18. – User-defined • User-defined lower-level entity sets are not constrained by a membership condition; rather, the database user assigns entities to a given entity set. • EX: A celebrity can be personalised into actor and politician. • Disjoint constraints – Disjoint: • The disjoint constraint only applies when a superclass has more than one subclass. If the subclasses are disjoint, then an entity occurrence can be a member of only one of the subclasses .e.g. postgrads or undergrads; one cannot be both. • To represent a disjoint superclass/subclass relationship, Or is used. February 21, 2025 18
  • 19. contd.. • Overlapping: This applies when an entity occurrence may be a member of more than one subclass, e.g. student and staff; some people are both. And is used to represent the overlapping specialization/generalization relationship in the ER diagram. February 21, 2025 19
  • 20. contd.. • Completeness constraints – Total: Each superclass (higher-level entity) must belong to subclasses (lower-level entity sets), e.g. a student must be postgrad or undergrad. To represent completeness in the specialization/generalization relationship, the keyword Mandatory is used. February 21, 2025 20
  • 21. contd.. • Partial: Some superclasses may not belong to subclasses (lower-level entity sets), e.g. some people at UCT are neither student nor staff. The keyword Optional is used to represent a partial specialization/generalization relationship. February 21, 2025 21
  • 22. Aggregation and Composition • Aggregation: – Aggregation represents a has-a relationship between entity types, where one represents the whole and the other the part. – An example of aggregation is the Car and Engine entities. A car is made up of an engine. The car is the whole and the engine is the part. – Aggregation does not represent strong ownership. This means, a part can exist on its own without the whole. There is no stronger ownership between a car and the engine. An engine of a car can be moved to another car. – A line with a diamond at the end is used to represent aggregation.The whole must be put at the end of the diamond. February 21, 2025 22
  • 23. contd.. • Composition – Composition is a form of aggregation that represents an association between entities, where there is a strong ownership between the whole and the part. – For example,: a tree and a branch have a composition relationship. A branch is 'part' of a 'whole' tree - we cannot cut the branch and add it to another tree. – A line with a filled diamond at the end is used to represent composition where the diamond side is towards the part side. February 21, 2025 23