Eroxl's NotesGraph
Generalization

In the same way as object oriented languages represent inheritance attributes can be inherited through generalization. This is a done through a IsA relationship between two or more entities.

In a entity-relationship diagram we show this be drawing a relationship with a triangle with the label IsA and then connecting it to the relevant entities. One corner (the "top") is connected to the "parent" entity (the one which we inherit attributes from) and then the opposite face is connected to any entities which inherit it's attributes.

Constraints

Overlap

Overlap constraints can take one of two forms:

  • Disjoint: A superclass entity belongs to at most one subclass. (ie. An Actor cannot also be a Musician).
  • Overlapping: A superclass entity may belong to multiple subclasses. (ie. A Person can be both an Actor and a Musician).

Covering

Covering constraints can take one of two forms:

  • Total: Every superclass entity must belong to some subclass. (ie. Every MoviePerson must be either an Actor or Musician).
  • Partial: Some superclass entities may not belong to any subclass. (ie. Some MoviePeople are neither Actors nor Musicians).