Part II

Inheritance

Several of the entries appearing in this part of the dictionary consist essentially of expansions of, or elaborations on, entries marked “Without inheritance” in Part I. Such entries are marked “With inheritance” accordingly.

image

Examples in what follows are based for the most part on either the simple type hierarchy shown in Fig. 2 or the slightly more general type graph shown in Fig. 3. Note that Fig. 2 involves single inheritance only and Fig. 3 involves multiple inheritance.

image

Fig. 2: Sample type hierarchy (single inheritance, q.v.)

image

Fig. 3: Sample type graph (multiple inheritance, q.v.)

The Type Hierarchy of Fig. 2

Fig. 2 is based on a collection of more or less self-explanatory geometric types—ELLIPSE, POLYGON, SQUARE, and so on.1 What it shows is that, e.g., type CIRCLE is a subtype of supertype ELLIPSE, which means that all circles are ellipses but the converse is false (some ellipses aren’t circles). As a consequence, all properties that apply to ellipses in general apply to—i.e., are inherited by—circles in particular, but the converse is false (circles have properties of their own that don’t apply to ellipses in general). Note: “Properties” here means, primarily, ...

Get The New Relational Database Dictionary now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.