City University of Hong Kong · FACULTY OF INFORMATION TECHNOLOGY

IS5413 Chap.5 Supertypes and Subtypes in the Enhanced ER Model

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 5 of 11 · IS5413

Supertypes and Subtypes in the Enhanced ER Model

One construct, added to the basic model

The enhanced model adds a general entity type with one or more specialised versions beneath it. The supertype holds the attributes and relationships shared by everything below it.

Each subtype adds only what is unique to it and inherits the rest, and the sentence that gives inheritance its meaning is that anything that is a member of a subtype is by that fact a member of the parent as well.

A subtype that ends up with no unique attributes and no unique relationships should not be drawn at all: in the published vehicle example the motorcycle loses its box once price, engine size and name have moved up to the supertype, and that is the correct outcome rather than an oversight.

Two constraints that answer different questions

Completeness asks a vertical question: does every member of the parent have to fall into some child?

Yes is total specialisation, drawn with a double line; no is partial specialisation, drawn with a single line. Disjointness asks a horizontal question: may one instance of the supertype belong to two subtypes at the same time? No is the disjoint rule, marked with a d; yes is the overlap rule, marked with an o.

The two are independent, so all four combinations are legal and a diagram carries both marks because neither implies the other.

This is the most common confusion in the chapter and the cure is simply to ask the vertical question and the horizontal question separately, in that order.

The discriminator takes its shape from the disjointness rule

The subtype discriminator sits on the parent and its value is what says which child a given member falls into, and its shape is decided rather than chosen.

Under the disjoint rule it is a simple attribute with one alternative value per subtype. Under the overlap rule it must be composite, with one part per subtype each holding a yes or no, because a single value cannot express two memberships at once.

In a hierarchy with more than one level, each level carries its own constraint pair and its own discriminator; treating the lower split as inheriting the upper one is a frequent error.

Two routes in, and where relationships attach

Generalisation works bottom up: several specific entity types are found to share attributes, so a more general parent is defined to hold them.

Specialisation works top down: one entity type turns out to have attributes applying only to some instances, so children are carved out. Both end with a supertype carrying the shared material. Where a relationship is drawn then asserts a business rule. A relationship at the supertype level says every subtype participates; one at a subtype level says only that subtype does.

The published hospital example puts the link to a responsible physician on the patient supertype because it applies to everyone, and the link to a bed on the resident subtype because only resident patients occupy one. Drawing that at the wrong level does not merely look untidy, it states something false.

In this chapter

What this chapter covers

  • 01

    Attribute inheritance and what it licenses

  • 02

    Generalisation against specialisation

  • 03

    Total against partial specialisation

  • 04

    The disjoint rule against the overlap rule

  • 05

    Discriminator shape under each rule

  • 06

    Relationships at supertype against subtype level

  • 07

    Packaged data models and what to check in them

Worked example · free

Fix both constraints and write the discriminator

Q [8 marks]. AskSia authored practice. A sports centre records members. A member may hold a swimming membership, a gym membership, both, or neither while still being recorded as a member. Swimming memberships have a lane preference; gym memberships have an induction date. Give the completeness rule, the disjointness rule, the discriminator shape, and say what changes if the centre later requires every member to hold at least one of the two. The marks shown here are a study allocation and are not the University's published marking scheme.
A hierarchy has a constraint pair at every level.A hierarchy has a constraint pair at every level. The upper split here is overlapping and the lower split is disjoint, which is why each circle carries its own mark.PERSONidentifier, name, addressoEMPLOYEEsalaryALUMNUSdegreeSTUDENTmajordFACULTYSTAFFo marks overlapping subtypesd marks disjoint subtypes
A hierarchy has a constraint pair at every level. The upper split here is overlapping and the lower split is disjoint, which is why each circle carries its own mark.
  • 2State the completeness rule with the words from the narrative that force it.
  • 2State the disjointness rule with the words that force it.
  • 2Write the discriminator and justify its shape.
  • 2Say what the later requirement changes, and what it leaves alone.
The word neither forces partial specialisation, so the split is drawn with a single line and a member may sit at the supertype level with no subtype. The word both forces the overlap rule, marked with an o. Because the rule is overlapping, the discriminator must be composite with two parts, one for swimming and one for gym, each holding a yes or no; a single valued attribute could record only one membership and so could not express the permitted combination. The later requirement changes the completeness rule from partial to total, so the single line becomes a double line, and it leaves the disjointness rule and therefore the discriminator shape completely unchanged.
Sia tip — Circle the words neither, both, exactly and every in the narrative before deciding anything; each of those four words settles exactly one of the two constraints.
Glossary

Key terms

Supertype
A generic entity type holding the attributes and relationships shared by all of its subtypes, with its identifier inherited by each of them.
Subtype
A subgrouping of an entity type carrying attributes distinct from the other subgroupings. Membership of a subtype carries membership of the parent with it.
Attribute Inheritance
The property that a subtype instance carries the values of every supertype attribute, which is why shared attributes are never repeated in the subtypes.
Total Specialisation
The completeness rule under which no member of the parent may sit outside every child. Drawn as a double line.
Disjoint Rule
The constraint that an instance of the supertype may belong to only one subtype at a time. Marked with a d, and it forces a simple discriminator.
Packaged Data Model
A predefined, reusable model, either universal or industry specific, offered as a starting point whose embedded constraints must be checked against your own business.
FAQ

Supertypes and Subtypes in the Enhanced ER Model FAQ

What is the difference between completeness and disjointness?

Completeness asks whether every parent instance reaches a child; disjointness asks whether one parent instance can reach two children. They are independent, so a hierarchy can be total and overlapping, total and disjoint, partial and overlapping, or partial and disjoint. Because neither implies the other, a correct diagram carries both marks, and a question giving you one of them is not giving you the other.

How do I know whether the discriminator is simple or composite?

The disjointness rule decides it, not preference. Under the disjoint rule a single valued attribute suffices, because each instance belongs to exactly one subtype and one value can name it. Under the overlap rule one value cannot express two simultaneous memberships, so the discriminator must be composite with one part per subtype, each holding a yes or no.

Should a subtype with no unique attributes still be drawn?

No. A subtype earns its box by carrying an attribute or a relationship the parent cannot, and an empty one adds a relation to the eventual schema for no benefit. The published generalisation example deliberately leaves one of its three original entity types without a subtype after the shared attributes move upward, and that absence is the correct answer rather than an omission.

Study strategy

Exam move

Write the four completeness and disjointness combinations as a two by two grid and put a real example in each cell from your own experience, not from the chapter. Then take any hierarchy with two levels and write both discriminators out in full, including every value or every yes and no part.

The discriminator is where the two constraints stop being abstract, so writing it is the fastest way to find out whether you decided them correctly.

Working through Supertypes and Subtypes in the Enhanced ER Model in IS5413? Sia is AskSia’s AI Information Technology tutor — ask any IS5413 Supertypes and Subtypes in the Enhanced ER Model question and get a clear, step-by-step explanation grounded in how IS5413 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 16 of your City University of Hong Kong subjects - and 1,000+ Bibles across every Australian university.
Sia - your IS5413 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works