Database Design Using EER | Database Management System

Database Design Using EER | Database Management System

Database Design Using EER | Database Management System : The extended entity-relationship model is mainly used as a language for conceptualisation of the structure of information systems applications. Conceptualisation of database or information systems aims in a representation of the logical and physical structure of an information system in a given database management system (or for a database paradigm), so that it contains all the information required by the user and required for the efficient behavior of the whole information system for all users. Furthermore, conceptualisation may target to specify the database application processes and the user interaction. Description of structuring is currently the main use of the extended ER model.

The diagram representation of EER schemata uses rectangles and diamonds for the entity and relationship types.

Database Design Using EER | Database Management System


Database Design Using EER | Database Management System


Database Design Using EER | Database Management System


  • The resulting model is called the enhanced-ER or extended ER (E2R or EER) model
  • It is used to model applications more completely and accurately if needed
  • it includes some object-oriented concepts, such as inheritance

All the additional concepts of EER are described as follows:

(1) Subclasses and Superclasses

  • An entity type may have additional meaningful subgroupings of its entities.
  • Each of these groupings is a subset of EMPLOYEE entities
  • Each is called a subclass of EMPLOYEE
  • EMPLOYEE is the superclass for each of these subclasses
  • These are called SuperClass/subclass relationships.

Database Design Using EER | Database Management System


These are also called ISA relationships (SECRETARY ISAEMPLOYEE TECHNICIAN SA EMPLOYEE,..).

Note: An entity that is member of a subclass represents the same real-world entity as some member of the Superclass :

  • The Subclass member is the same entity in a distinct specific role.
  • An entity cannot exist in the database merely by being a member of a subclass; it must also be a member of the Superclass.
  • A member of the Superclass can be optionally included as a member of any number of its Subclasses.


Example: A salaried employee who is also an engineer belongs to the two subclasses ENGINEER and SALARIED_EMPLOYEE.

It is not necessary that every entity in a Superclass be a member of Some subclass

(2) Attribute inheritance in Superclass/Subclass Relationships

  • An entity that is member of a subclass inherits all attributes of the entity as a member of the SuperClass.
  • It also inherits all relationships.

(3) Specialization

  • Specialization is the process of defining a Set of Subclasses of a superClass.
  • The set of subclasses is based upon some distinguishing characteristics of the entities in the Superclass.
  • Example: (SECRETARY, ENGINEER, TECHNICAN} is a specialization of EMPLOYEE based upon job type. May have Several specializations of the same Superclass
  • Example: Another specialization of EMPLOYEE based in method of pay is {SALARED_EMPLOYEE, HOURLY_EMPLOYEE}.
  • superclass/subclass relationships and specialization Canbediagrammatically represented in EER diagrams.
  • Attributes of a Subclass are called specific attributes. For example, typing speed of SECRETARY. – The Subclass can participate in specific relationship types. For example, BELONGS TO of HOURLY_EMPLOYEE.

Example of a Specialization

Database Design Using EER | Database Management System

(4) Generalization

  • Generalization is the reverse of the specialization process
  • Several classes with common features are generalized into a SuperClass; original classes become its Subclasses
  • Example: CAR, TRUCK generalized into VEHICLE, both CAR, TRUCK become subclasses of the superclass VEH|CLE.


  • We can view (CAR, TRUCK. as a specialization of VEHICLE
  • Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK


(a) Generalization and Specialization

  • Arrow pointing to the generalized superclass represents a generalization.
  • Arrows pointing to the specialized subclasses represent a specialization.
  • We do not use this notation because it is often subjective as to which process is more appropriate for a particular situation.
  • We advocate not drawing any arrows in these situations.
  • A superClass or subclass represents a set of entities.
  • Shown in rectangles in EER diagrams (as are entity types).
  • Sometimes, all entity sets are simply called classes, whether they are entity types, superclasses, or Subclasses.

(b) Constraints on Specialization and Generalization

  • If we can determine exactly those entities that will become members of each subclass by a condition, the subclasses are called predicate-defined (or condition-defined) subclasses:
  • Condition is a Constraint that determines Subclass members.
  • Display a predicate-defined subclass by writing the predicate condition next to the line attaching the Subclass to its superclass.


  • If all Subclasses in a specialization have membership condition on same attribute of the superclass, Specialization is called an attribute defined-specialization:
  • Attribute is called the defining attribute of the specialization.
  • Example: JobType is the defining attribute of the specialization (SECRETARY, TECHNICAN, ENGINEER} of EMPLOYEE.


  • if no condition determines membership, the subclass is called user-defined:
  • Membership in a Subclass is determined by the database users by applying an operation to add an entity to the subclass.
  • Membership in the Subclass is specified individually for each entity in the Superclass by the user.


Two other conditions apply to a specialization/generalization:

  1. Disjointness Constraint:
  • Specifies that the Subclasses of the Specialization must be disjointed (an entity can be a member of at most one of the subclasses of the specialization)
  • Specified by din EER diagram
  • if not disjointed, overlap, that is the same entity may be a member of more than one subclass of the Specialization
  • Specified by o in EER diagram


  1. Completeness Constraint:
  • Total Specifies that every entity in the Superclass must be a member of some subclass in the Specialization/generalization
  • Shown in EER diagrams by a double line
  • Partial allows an entity not to belong to any of the subclasses
  • Shown in EER diagrams by a single line


Hence, we have four types of specialization/generalization:

  • Disjoint, total
  • Disjoint, partial
  • Overlapping, total
  • Overlapping, partial


Note : Generalization usually is total because the superclass is derived from the subclasses.

Database Design Using EER | Database Management System




 (c) Specialization / Generalization Hierarchies, Lattices and Shared Subclasses

  • A subclass may itself have further subclasses specified on it
  • it forms a hierarchy or a lattice
  • Hierarchy has a constraint that every subclass has only one superclass (called single inheritance)
  • In a lattice, a subclass can be subclass of more than one superclass (called multiple inheritance) In a lattice or hierarchy, a subclass inherits attributes not only of its direct superclass, but also of all its predecessor Superclasses
  • A subclass with more than one superclass is called a shared subclass
  • Can have specialization hierarchies or lattices or generalization hierarchies or lattices
  • In specialization, start with an entitytype and then define Subclasses of the entitytype by Successive specialization (top down conceptual refinement process)
  • In generalization, start with many entity types and generalize those that have common properties (bottom up conceptual synthesis process)
  • In practice, the combination of two processes is employed.


d) Specialization / Generalization Lattice Example (UNIVERSITY)

Database Design Using EER | Database Management System


(5) Categories (UNİON TYPES)

  • All of the Superclass/subclass relationships we have seen thus far have a single Superclass
  • A shared Subclass is Subclass in more than one distinct Superclass/subclass relationships, where each relationships has a single superclass (multiple inheritance)
  • In some cases, need to model a single superclass/subclass relationship with more than one Superclass
  • Superclasses represent different entity types
  • Such a subclass is called a category or UNION TYPE
  • For example, Database for vehicle registration, vehicle owner can be a person, a bank (holding alien on a vehicle) or a company.
  • Category (subclass) OWNER is a subset of the union of the three superclasses COMPANY., BANK, and PERSON
  • A category member must exist in at least one of its superclasses

Note: The difference from shared subclass, which is subset of the intersection of its superclasses (shared subclass member must exist in all of its superclasses).


Example of categories (UNION TYPES)

Database Design Using EER | Database Management System

Key Applications

The main application area for extended ER models is the conceptualisation of database applications. Database schemata can be translated to relational, XML or other schematabased on transformation profile that incorporate properties of the target Systems.