In: Computer Science
You are creating an enhanced entity-relationship model for a campus information system. A junior team member who is helping you asks you to describe the following terms with examples of relevant entities from the system, for example, students, activities etc.
1. Supertype and Subtype
2. Disjoint and Overlapping Discriminator
3. Total and Partial Completeness
4. Attribute Inheritance
1.Supertype and Subtype
Supertype is an entity type that has got relationship (parent to child relationship) with one or more subtypes and it contains attributes that are common to its subtypes. Subtypes are subgroups of the supertype entity and have unique attributes, but they will be different from each subtype
For example
2.Disjoint and Overlapping Discriminator
Disjoint Discriminator - simple attributes that must have alternative values to indicate any possible subtypes.
Overlapping Discriminator - composite attributes whose subparts pertain to various subtypes.
For example, in a university environment, a person may be an employee or a student or both. In turn, an employee may be a professor as well as an administrator. Because an employee may also be a student, STUDENT and EMPLOYEE are overlapping subtypes of the supertype PERSON, just as PROFESSOR and ADMINISTRATOR are overlapping subtypes of the supertype EMPLOYEE.
3. Total and Partial Completeness
Partial completeness means that not every supertype occurrence is a member of a subtype; that is, there may be some supertype occurrences that are not members ofany subtype.
Total completenessmeans that every supertype occurrence must bea member of at least one subtype.
Partial example: an employee can be a student or teacher, but doesn't have to be.
Total example: A student must be either a graduate or an undergrad.
4.Attribute Inheritance
An inherited attribute is one that is inherited from a parent product class. You customize an inherited attribute domain by editing its definition at the subclass level. When you edit an inherited attribute definition, the changes propagate to all members of the subclass, including other subclasses under that subclass.
For example : Student and Teacher are two different class of persons, but they belong to Person category. Here Student and Teacher could have their own specific behaviours like activity(), profession(), but they have some behaviours like eating, sleeping, etc. in common.