Database management: EER model simply explained

Before you press forward with the EER model explanation, please read ER model explanation, which is the building block for the EER model. EER (enhanced entity relationship model) is an extension of the ER model and simply adds three new data modeling concepts: specialization, categorization, and aggregation.

Specialization is simply breaking down entity types into its subclasses. For example, artist entity type can be broken down into musician entity type and painter entity type. This process can be considered “is a” breakdown, since painter and musician IS an artist, but the opposite doesn’t apply since not all artist is a singer or a painter. Attribute types that are specific to the subclasses can be attached to that entity types, but if there’s attribute type that all shares, then it can go to the superclass entity type since subclass will inherit it. The reverse process of specialization is called generalization, so going from singer to an artist entity type. Simply think of specialization as top down approach and generalization as down up approach. This is shown in the EER model with a circle and curved line pointing towards the subclasses from the superclass. The specialization can be further be qualified by disjointness and completeness constraints where disjointness specifies what subclasses an entity of the superclass can belong to while completeness constraint indicates whether all entities of the superclass should belong to one of the subclasses or not.

Disjointness can be either disjoint or overlap and it is marked inside the circle as either d or o and it is what defines what subclasses the superclass can belong to. Disjoint means the superclass entities can be member of at most one of the subclasses and no more while overlap means it can be multiple. For example, if artist superclass entity type can only be either a singer or an actor, it’s disjoint while if it can be both of them, it’s considered overlap. The completeness constraint goes under the superclass as either total or partial and is marked as p or t where partial allows entity to only belong to the superclass and to none of the subclass and total means every entity in the superclass must be member of some subclass. For example, total will state that artist must be either a singer or actor entity types if those two are the only subclass entity types that’s shown. If it says partial and there’s the same two entity types, it is saying that it doesn’t need to be either a singer or a actor and can belong to just superclass artist entity type as there may be other entity type like painter entity type that isn’t shown in the diagram. This will give you four combinations to utilize, disjoint and total, disjoint and partial, overlap and total, and overlap and partial.

Let’s talk about the second concept that’s added, which is categorization. All categorization is represented in the circle with u for union. Categorization basically subclass with multiple superclasses. Instead of superclass having multiple subclasses like specialization, categorization allows subclasses to belong to multiple superclasses. Once again, subclass will inherit attributes and relationships of superclass of which it is a member to. Categorization can be either partial or total where entities of superclasses can either not belong to the subclass or all entities of the superclasses can belong to the subclasses. Partial means not all entities belong to the subclass while total means all superclasses belong to the subclass. The curved line is denoted below the union circle and faces towards the subclass.

Lastly we have aggregation concept, where particular relationship types are combined into a higher entity type. ER isn’t able to represent relationship between entity and a relationship properly, so at times aggregation is utilized to represent relationships as higher level entity sets. For example, an employee that works on a project is an entity that has been aggregated because they have their own relationship with machinery. Not all employee needs relationship with the machinery.