ENHANCED ER TOOLS
ER modeling concepts the EER model includes:
1) Subclass and Super class
2) Inheritance
3) Specialisation and Generalisation.
To describe the concepts of subclass and super class first let us revisit the concept of
‘entity’. The basic object that an E-R model represents is an entity, which is a “thing”
in the real world with an independent existence. An entity may be an object with a
physical existence or it may be an object with a conceptual existence. Each entity has
attributes (the particular properties that describe it).
Example : the entity vehicle describes the type (that is, the attributes and
relationship) of each vehicle entity and also refers to the current set of vehicle entities
in the showroom database. Some times to signify the database application various
meaningful sub-groupings of entity is done explicitly. For example, the members of
the entity vehicle are further meaningfully sub- grouped as: Car, Scooter, truck and so
on.
The set of entities in each of the groupings is a subset of the entities that belongs to
the entity set vehicle. In other words every sub-grouping must be vehicle. Therefore,
these sub-groupings are called a subclass of the vehicle entity type and the vehicle
itself is called the super class for each of these subclasses.
The relationship between a super class and any of its subclasses is called
class/subclass relationship. It is often called an IS-A or relationship because of the
way we refer to the concept, we say, “car is-a vehicle”. The member entity of the
subclass represents the same real world as the member entity of the super class. If
an entity is a member of a subclass, by default it must also become a member of
the super class whereas it is not necessary that every entity of the super class must
be a member of its subclass. From the discussion above on sub/super classes we
can say that an entity that is a member of a subclass inherits all the attributes of
9
Relational Database
Design
the entity as a member of the super class. Notice that the type of an entity is
defined by the attributes it possesses and the relationship types in which it
participates; therefore, the entity also inherits all the relationships in which the
super class participates. According to inheritance the subclass has its own
attributes and relationships together with all attributes and relationships it inherits
from the super class.
The process of defining the subclasses of an entity type is called specialisation,
where the entity type is called the super class of the specialisation. The above said
specialised set of subclasses are defined on the basis of some common but
distinguishing characteristics of the entities in the super class. For example, the set
of subclasses (car, scooter, truck) is a specialisation of the super class vehicle that
distinguished among vehicles entities based on the vehicle type of each entity. We
may have several other specialisations of the same entity type based on different
common but distinctive characteristics. Figure 2 shows how we can represent a
specialisation with the help of an EER diagram.

The subclasses that define a specialisation are attached by lines to a circle, which
is connected further with the super class. The circle connecting the super class
with the subclass indicates the direction of the super class/ subclass relationship.
The letter ‘d’ in the circle indicates that all these subclasses are disjoint
constraints.
Attributes that apply only to entities of a particular subclass – such as mileage of
car, stock of scooter and capacity of truck are attached to the rectangle
representing that subclass. Notice that an entity that belongs to a subclass
represents the same real-world entity as the entity connected to super class, even
though the same entity is shown twice − one in the subclass and the other in the
super class. A subclass is defined in order to group the entities to which these
attributes apply. The members of a subclass may still share the majority of their
attributes with the other members of the super class (as shown in Figure 3).
Hence the specialisation is a set of subclasses of an entity type, which establishes
additional specific attributes with each subclass and also establishes additional
specific relationship types between each subclass and other entity types or other
subclasses.
ER modeling concepts the EER model includes:
1) Subclass and Super class
2) Inheritance
3) Specialisation and Generalisation.
To describe the concepts of subclass and super class first let us revisit the concept of
‘entity’. The basic object that an E-R model represents is an entity, which is a “thing”
in the real world with an independent existence. An entity may be an object with a
physical existence or it may be an object with a conceptual existence. Each entity has
attributes (the particular properties that describe it).
Example : the entity vehicle describes the type (that is, the attributes and
relationship) of each vehicle entity and also refers to the current set of vehicle entities
in the showroom database. Some times to signify the database application various
meaningful sub-groupings of entity is done explicitly. For example, the members of
the entity vehicle are further meaningfully sub- grouped as: Car, Scooter, truck and so
on.
The set of entities in each of the groupings is a subset of the entities that belongs to
the entity set vehicle. In other words every sub-grouping must be vehicle. Therefore,
these sub-groupings are called a subclass of the vehicle entity type and the vehicle
itself is called the super class for each of these subclasses.
class/subclass relationship. It is often called an IS-A or relationship because of the
way we refer to the concept, we say, “car is-a vehicle”. The member entity of the
subclass represents the same real world as the member entity of the super class. If
an entity is a member of a subclass, by default it must also become a member of
the super class whereas it is not necessary that every entity of the super class must
be a member of its subclass. From the discussion above on sub/super classes we
can say that an entity that is a member of a subclass inherits all the attributes of
9
Relational Database
Design
the entity as a member of the super class. Notice that the type of an entity is
defined by the attributes it possesses and the relationship types in which it
participates; therefore, the entity also inherits all the relationships in which the
super class participates. According to inheritance the subclass has its own
attributes and relationships together with all attributes and relationships it inherits
from the super class.
The process of defining the subclasses of an entity type is called specialisation,
where the entity type is called the super class of the specialisation. The above said
specialised set of subclasses are defined on the basis of some common but
distinguishing characteristics of the entities in the super class. For example, the set
of subclasses (car, scooter, truck) is a specialisation of the super class vehicle that
distinguished among vehicles entities based on the vehicle type of each entity. We
may have several other specialisations of the same entity type based on different
common but distinctive characteristics. Figure 2 shows how we can represent a
specialisation with the help of an EER diagram.
The subclasses that define a specialisation are attached by lines to a circle, which
is connected further with the super class. The circle connecting the super class
with the subclass indicates the direction of the super class/ subclass relationship.
The letter ‘d’ in the circle indicates that all these subclasses are disjoint
constraints.
Attributes that apply only to entities of a particular subclass – such as mileage of
car, stock of scooter and capacity of truck are attached to the rectangle
representing that subclass. Notice that an entity that belongs to a subclass
represents the same real-world entity as the entity connected to super class, even
though the same entity is shown twice − one in the subclass and the other in the
super class. A subclass is defined in order to group the entities to which these
attributes apply. The members of a subclass may still share the majority of their
attributes with the other members of the super class (as shown in Figure 3).
Hence the specialisation is a set of subclasses of an entity type, which establishes
additional specific attributes with each subclass and also establishes additional
specific relationship types between each subclass and other entity types or other
subclasses.
No comments:
Post a Comment