Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Enhance ER Modelling

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, Inheritance etc.

 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. For
example, a vehicle could be a superclass, while car, truck, and motorcycle
could be subclasses.

Vehical Superclass

Car Truck Motorcycle

Subclass
Superclass

Subclass Subclass

 Generalization and Specialization: Generalization is the process of


defining a superclass from two or more subclasses.
 Generalization is the process of identifying common attributes and
relationships between entities and creating a supertype based on these
common features.

 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.

 Specialization is the process of identifying unique attributes and


relationships between entities and creating subtypes based on these unique
features.
Name
DOB
EID

EMPLOYEE

Typing Eng type


Speed
Secretary Technician Engineer

Tgrade
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.

In the context of databases and DBMS (Database Management Systems), inheritance


refers to a concept in which a table (child table) inherits the attributes and relationships
of another table (parent table). It is a feature provided by some object-relational
database systems that allows tables to inherit and reuse the structure and functionality
of existing tables.

Inheritance in DBMS is similar to the concept of inheritance in object-oriented


programming. It enables the creation of a hierarchy of tables, where the child tables
inherit the attributes, relationships, and behavior (such as constraints and functions) of
the parent table. This helps to organize and model data in a more efficient and logical
manner.

The key benefits of using inheritance in DBMS are:

1. Code Reusability: Inheritance allows the child tables to inherit the


attributes and relationships defined in the parent table. This promotes
code reuse and reduces redundancy, as common properties need not
be defined repeatedly in each child table.
2. Consistency: Inheritance helps maintain consistency across the database
schema. If changes are made to the structure or behavior of the parent
table, these changes are automatically reflected in all child tables that
inherit from it.
3. Polymorphism: Inheritance enables polymorphic behavior, where the
child tables can be treated as instances of the parent table. This allows
for flexibility in querying and manipulating data.
4. Simplified Database Design: Inheritance allows for a more natural
representation of hierarchical relationships between entities, reducing
the complexity of the database schema.
5.
It's important to note that not all database management systems support inheritance
natively.

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

You might also like