In: Computer Science
Overview
In this lab, you will design an Enhanced Entity Relationship (EER) diagram to improve on the database design that you have worked on in the previous weeks.
The new design will include additional improvements such as:
A clear and well-documented explanation of all your modifications and the EER diagram.
can you please give me an example of how to start this or what am i supposed to do!!!
EER MODEL:
INHERITANCE RELATIONSHIP(Superclass/Subclass Relationship):
Example:
Concept about Superclass/Subclass:
1)Reasons for using superclass/subclass:
1. certain attributes may apply to some but not all entities of the superclass.
2. some relationship types may be participated in only by entities that are members of the subclass.
2)Every instance of any subclass is also a member of its superclass.
3)Relationship between a superclass and any one of its subclasses is called class/subclass relationship (also called IS-A relationship).
4) A subclass inherits all the attributes and relationships of its superclass.
5) A subclass can have relationship types with other entities, independently of the superclass.
Superclass - an entity type that relates to one or more subclass.
Subclass- a subgroup of entities with unique attributes.
Inheritance - the concept that subclass entities inherit the values of all superclass attributes.
SPECIALIZATION :
1) Specialization is the process of defining a set of subclasses of an entity type; this entity type is called the superclass of the specialization.
CONSTRAINT:
1)A specialization may result in one or more subclasses.
Predicate defined subclasses:
1. Subclasses are usually identified by a condition on the value of some attribute of the superclass. 2.Such subclasses are called predicate-defined (or condition-defined) subclasses.
3. Example:
(Job_type = ‘Secretary’)
This condition is a constraint specifying that exactly those entities of the EMPLOYEE entity type whose attribute value for Job_type is ‘Secretary’ belong to the subclass.
2) If all subclasses are based on the same attribute of the superclass, the specialization itself is called an attributedefined specialization.
3) such an attribute is called the defining attribute.
4) When we do not have a condition for determining membership in a subclass, the subclass is called user- defined.
TYPES OF CONSTRAINT:
1) Disjointness constraint:
1) An attribute-defined specialization implies the disjointness constraint.
2) When subclasses are disjoint, an entity can be a member of at most one of the subclasses of the specialization.
3)If the subclasses are not constrained to be disjoint, their sets of entities may be overlapping.
Fig:Disjoint
Fig.Overlapping
2)Completeness constraint:
It is a constraint on the belongingness of superclass member in subclasses.
It could be total or partial:
Total: every entity in the superclass must be a member of at least one subclass in the specialization.
Generalization process is usually total.
Partial: an entity may not belong to any subclass.
Fig:Disjoin&Partial
Fig.Overlapping&total
Union Types:
When a single subclass is modelled using more than one superclasses, usually of different entity types, such a subclass is called a union type or a category.