EER Model in DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

The existing ER model needs to be enhanced or improved for it to better handle the complicated application to reduce the modeling complexity and you may want to opt for an enhanced entity-relationship model.

All the components of an ER diagram are included in an EER diagram, with the following additions that help us create and maintain detailed databases through high-level models and tools.

  • Specialization and Generalization
  • Aggregation
  • Category or Union types
  • Subclass and superclass

What is an EER Diagram?

Today, as data creation has expanded, so has the complexity of data. As a result, using the standard Entity-Relationship paradigm for database modeling is becoming increasingly problematic. To reduce modeling complexity, there was a need to update and enhance the existing Entity-Relationship model so that it could manage modeling and application complexity better. This is where the concept of the EER model i.e. Enhanced ER Models comes into play.

Like regular ER diagrams, enhanced ER models are sophisticated database diagrams that show the requirements and complexity of many complex databases. In a word, it is a hybrid ER model with a few more or fewer difficulties. A sort of diagram used to depict Enhanced ER Models is the Enhanced ER Diagram. In addition to other ideas, they illustrate subclass and superclass, generalization and specialization, union or category, and aggregation.

The below diagram is a representation of an Enhanced Entity-relationship model. As you can see, the below EER model is expanded upon ER models.

An image that explains the enhanced entity relationship model

enhanced entity relationship model

A Brief History of EER Diagrams

Before working on various projects, an IBM engineer in the United Kingdom created a new ER diagram in the 1970s. That is when the concept took root, grew, and evolved into what is now known as the EER diagram.

EER models are useful tools for creating high-level model databases. The EER diagrams became important because they provide all the features that are included in the ER diagrams with the addition of the following elements:

  • Specialization and Generalization
  • Aggregation
  • Category or Union types
  • Subclass and superclass

Features of the EER Model

  • EER generates designs that are more accurate to database schemas.
  • The diagrammatic style is useful in displaying the EER schema.
  • The modeling concepts that are included in the ER model are also included in the EER model.
  • The data properties and constraints reflected by the EER model are very precise.
  • It incorporates the ideas of specialization and generalization.
  • It is used to represent a collection of objects that are a union of distinct types of objects.

Sub Class and Super Class

The link between subclasses and superclasses introduces the idea of inheritance. The 'd' symbol is used to indicate the relationship between subclasses and superclasses.

Sub Class

A superclass is a type of entity that is connected to one or more subtypes. And, also note that a database entity cannot be created just by belonging to a superclass.

For example: The superclass of shapes includes subgroups like Triangle, Circles, and Squares.

Super Class

A subclass is a collection of objects with special characteristics. The traits and properties of a subclass are inherited from its superclass.

For example: Triangles, Circles, and squares are the subclass of the Shape superclass.

Example image that displays the sub class and super class of the above discussed example

Specialization

Specialization is a procedure that defines a set of entities that are divided into subgroups based on their characteristics. The Enhanced ER model was designed in a top-to-bottom approach using the Specialization. In this model, the superclass or parent object is defined first by utilizing a box i.e. a rectangle box. After this, it is separated into subclasses, which are comparable entity types.

Let's take an example of a scenario, that handles, stores, and processes a large amount of data, for a company that manufactures automobiles. The primary feature of this company is the Vehicle, also considered as a superclass. All the other attributes of the superclass are the type of vehicle, the color of the vehicle, the average of the vehicle, etc.

Now, the vehicle which is a superclass can further be subdivided into various subclasses, for example, Cars, scooters, and Trucks. Here, each of the above-mentioned subclasses inherits all of the attributes of the superclass i.e. the Vehicle superclass. Also, note that a subclass can have its properties in addition to inherited ones. The below diagram is a representation of the above-given scenario.

Generalization

Extraction of the shared characteristics or traits of entities to compile them into a superclass is the process of Generalization. It is a reverse process of Specialization. In short, it converts subclasses to superclasses. However, generalization is a process that combines only those entity sets that share the same features into higher-level entities.

As generalization is a reverse process of specialization, it follows a bottom-up approach i.e. the lower-level entities combine to form a higher-level entity.

Let's take the above example of the data handling scenario for a company that manufactures automobiles. The scooter, car, and truck are the three primary entities in the Enhanced ER diagram in the given example. These entities can include attributes like registration number, license period, insurance number, and so on, and they can be used as subclasses for both Commercial and Private vehicle superclasses. The attributes belong to the subclasses Car, Scooter, and truck and are included in their respective superclasses due to their commonality. This process of taking the shared attributes and reaching the fundamental primary root is known as Generalization.

Category or Union

A Category or Union represents a single sub-class or super-class relationship between two or more super-classes. However, the participation of the superclasses can be partial or total. In short, a category or union represents a relationship of "either" type.

Let's consider an example of a car and its owner. The owner can be considered as a subclass and the superclass can be an individual, a company, or a bank. As shown in the below EER model in DBMS, the subclass i.e. a car owner in the car booking model can be any of the superclasses i.e. an individual, a company, or a bank.

Aggregation

Aggregation is a high-level data modeling technique that makes use of both Generalization and Specialization. It is widely used to connect distinct entity types based on a shared relationship. This idea is commonly used to represent execution elements, operational lines, or functional behavior of a similar sort in terms of shared properties.

Aggregation is used to simplify the details of a given database by converting ternary relationships to binary ones. Ternary relationships are merely one sort of relationship that exists between three entities. Let's take an example to understand aggregation. In this example, both the teachers and students are related to each other via learning. And, this relationship between the teachers and students is acting as an entity that is related to the Student.

Conclusion

  • Enhanced ER models are advanced database diagrams that, like ordinary ER diagrams, depict the requirements and complexities of complicated databases.
  • All the components of an ER diagram are included in an EER diagram and there are some additions mentioned below that helps us create and maintain detailed databases through high-level model and tools.
  • Additions are Specialization and Generalization, Aggregation, Category or Union types, and Subclass and superclass.
  • EER model in DBMS generates designs that are more accurate to database schemas and the modeling concepts that are included in the ER model are also included in the EER model.
  • Generalization is the process of extracting the common attributes or properties of entities to sum them up and form a superclass.
  • Specialization is a procedure that defines a set of entities that are divided into subgroups based on their characteristics.
  • Aggregation is a high-level data modeling technique that makes use of both Specialization and Generalization. It is widely used to connect distinct entity types based on a shared relationship.