0% found this document useful (0 votes)
56 views7 pages

Enhanced ER Model

The Enhanced Entity-Relationship (EER) model extends the traditional ER model to better handle complex data relationships by incorporating concepts such as subclasses, superclasses, generalization, specialization, and inheritance. It allows for the creation of hierarchical structures, union types, aggregation, and multi-valued attributes, making it a powerful tool for database design. EER models provide a more expressive framework for accurately representing intricate relationships between entities.

Uploaded by

kamleshrani2814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views7 pages

Enhanced ER Model

The Enhanced Entity-Relationship (EER) model extends the traditional ER model to better handle complex data relationships by incorporating concepts such as subclasses, superclasses, generalization, specialization, and inheritance. It allows for the creation of hierarchical structures, union types, aggregation, and multi-valued attributes, making it a powerful tool for database design. EER models provide a more expressive framework for accurately representing intricate relationships between entities.

Uploaded by

kamleshrani2814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Enhanced ER Model

Today the complexity of the data is increasing so it becomes more and


more difficult to use the traditional ER model for database modeling. To
reduce this complexity of modeling we have to make improvements or
enhancements to the existing ER model to make it able to handle the
complex application in a better way. Enhanced entity-relationship
diagrams are advanced database diagrams very similar to regular ER
diagrams which represent the requirements and complexities of
complex databases. It is a diagrammatic technique for displaying the
Sub Class and Super Class; Specialization and Generalization; Union or
Category; Aggregation etc.

ER model
The ER model is the abstract representation of a database structure that
defines

Entities in a database.
Attributes that they had.
Relationships between them.

What is an Enhanced ER model?


Enhanced ERDs are high-level models that represent the requirements
and complexities of complex databases. The EER model includes all
modeling concepts of the ER model. In addition, EER includes the
following concepts.

Subclasses and Superclasses


Specialization and Generalization
Category or Union type
Attribute and relationship inheritance

Superclass and Subclass


A superclass is a high-level entity that can be further segmented into
subclasses or subsets. It is also referred to as a Parent class. A subclass
can be referred to as a child or derived class.

Example: Science is a Super class which has subclasses like Physics,


Chemistry, Biology.

Generalization and Specialization


These are very common relationships found in real entities. However,
this kind of relationship was added later as an enhanced extension to
the classical ER model. Specialized classes are often called subclass
while a generalized class is called a superclass, probably inspired by
object-oriented programming. A sub-class is best understood by “IS-A
analysis”. The following statements hopefully make some sense to your
mind “Technician IS-A Employee”, and “Laptop IS-A Computer”.

An entity is a specialized type/class of another entity. For example, a


Technician is a special Employee in a university system Faculty is a
special class of Employees. We call this phenomenon
generalization/specialization. In the example here Employee is a

Example:
This example instance of “sub-class” relationships. Here we have four
sets of employees: Secretary, Technician, and Engineer. The employee is
a super-class of the rest three sets of individual sub-class is a subset of
Employee set.
An entity belonging to a sub-class is related to some super-class
entity. For instance emp, no 1001 is a secretary, and his typing speed
is 68. Emp no 1009 is an engineer (sub-class) and her trade is
“Electrical”, so forth.
Sub-class entity “inherits” all attributes of super-class; for example,
employee 1001 will have attributes eno, name, salary, and typing
speed.

Enhanced ER Model of Above Example

Constraints

There are two types of constraints on the “Sub-class” relationship.

Total or Partial – A sub-classing relationship is total if every super-


class entity is to be associated with some sub-class entity, otherwise
partial. Sub-class “job type based employee category” is partial sub-
classing – not necessary every employee is one of (secretary,
engineer, and technician), i.e. union of these three types is a proper
subset of all employees. Whereas other sub-classing “Salaried
Employee AND Hourly Employee” is total; the union of entities from
sub-classes is equal to the total employee set, i.e. every employee
necessarily has to be one of them.
Overlapped or Disjoint – If an entity from a super-set can be related
(can occur) in multiple sub-class sets, then it is overlapped sub-
classing, otherwise disjoint. Both the examples: job-type based and
salaries/hourly employee sub-classing are disjoint.

Note – These constraints are independent of each other: can be


“overlapped and total or partial” or “disjoint and total or partial”.
Also, sub-classing has transitive properties.

Multiple Inheritance ( sub-class of multiple superclasses)

An entity can be a sub-class of multiple entity types such entities are


sub-class of multiple entities and have multiple super-classes. In
multiple inheritances, attributes of sub-class are the union of attributes
of all super-classes.
Example
Teaching Assistant can subclass of Employee and Student both. A
faculty in a university system can be a subclass of Employee and
Alumnus.

Union

Set of Library Members is UNION of Faculty, Student, and Staff. A


union relationship indicates either type; for example, a library
member is either Faculty or Staff or Student.
Below are two examples that show how UNION can be depicted in
ERD – Vehicle Owner is UNION of PERSON and Company, and RTO
Registered Vehicle is UNION of Car and Truck.
There might be some confusion in Sub-class and UNION.

Consider an example in above figure Vehicle is super-class of CAR and


Truck. This is the correct example of the subclass as well but here it is
used differently that we are saying RTO Registered vehicle is UNION of
Car and Vehicle, they do not inherit any attribute of Vehicle, attributes of
car and truck are altogether independent set, where is in sub-classing
situation car and truck would be inheriting the attribute of vehicle class.

An Enhanced Entity-Relationship (EER) model is an extension of the


original Entity-Relationship (ER) model that includes additional
concepts and features to support more complex data model
requirements. The EER model includes all the elements of the ER model
and adds new constructs, such as subtypes and supertypes,
generalization and specialization, and inheritance.

Key Features of the EER Model


Subtypes and Supertypes: The EER model allows for the creation of
subtypes and supertypes. A supertype is a generalization of one or
more subtypes, while a subtype is a specialization of a supertype. For
example, a vehicle could be a supertype, while car, truck, and
motorcycle could be subtypes.
Generalization and Specialization: Generalization is the process of
identifying common attributes and relationships between entities and
creating a supertype based on these common features. Specialization
is the process of identifying unique attributes and relationships
between entities and creating subtypes based on these unique
features.
Inheritance: Inheritance is a mechanism that allows subtypes to
inherit attributes and relationships from their supertype. This means
that any attribute or relationship defined for a supertype is
automatically inherited by all its subtypes.
Constraints: The EER model allows for the specification of
constraints that must be satisfied by entities and relationships.
Examples of constraints include cardinality constraints, which specify
the number of relationships that can exist between entities, and
participation constraints, which specify whether an entity is required
to participate in a relationship.
Overall, the EER model provides a powerful and flexible way to
model complex data relationships, making it a popular choice
fordatabase design . An Enhanced Entity-Relationship (EER) model is
an extension of the traditional Entity-Relationship (ER) model that
includes additional features to represent complex relationships
between entities more accurately. Some of the main features of the
EER model are:
Subclasses and Superclasses: EER model allows for the creation of
a hierarchical structure of entities where a superclass can have one or
more subclasses. Each subclass inherits attributes and relationships
from its superclass, and it can also have its unique attributes and
relationships.
Specialization and Generalization: EER model uses the concepts of
specialization and generalization to create a hierarchy of entities.
Specialization is the process of defining subclasses from a
superclass, while generalization is the process of defining a
superclass from two or more subclasses.
Attribute Inheritance: EER model allows attributes to be inherited
from a superclass to its subclasses. This means that attributes
defined in the superclass are automatically inherited by all its
subclasses.
Union Types: E ER model allows for the creation of a union type,
which is a combination of two or more entity types. The union type
can have attributes and relationships that are common to all the
entity types that make up the union.
Aggregation: EER model allows for the creation of an aggregate
entity that represents a group of entities as a single entity. The
aggregate entity has its unique attributes and relationships.
Multi-valued Attributes: EER model allows an attribute to have
multiple values for a single entity instance. For example, an entity
representing a person may have multiple phone numbers.
Relationships with Attributes: EER model allows relationships
between entities to have attributes. These attributes can describe the
nature of the relationship or provide additional information about the
relationship.

Overall, these features make the EER model more expressive and
powerful than the traditional ER model, allowing a more accurate
representation of complex relationships between entities.

You might also like