The gap
A relationship is {entity, cardinality, role, ownership, note}. There is no way to say one entity is a kind of another. Generalization is a bread-and-butter domain-modeling construct, and models hit it early.
Motivating example, from modeling a diagram tool's scene graph. The model has a Node entity and four kinds of node:
Node:
definition: >-
Any element of the scene tree. Every `Node` is exactly one of
`Container`, `Shape`, `Arrow`, or `Label`. ...
invariants:
- id: node-unique-id
statement: A `Node` id is unique within its `Scene`.
Container:
definition: A `Node` that establishes a local coordinate frame ...
Shape:
definition: A leaf `Node` with visible geometry ...
The "is a kind of" claim lives only in definition prose. Three costs:
- The rendered ER diagram cannot draw the subtype fan.
Shape and Node appear unrelated.
- Invariants declared on
Node (unique id, single parent) do not formally bind to Container, Shape, Arrow, or Label.
- The linter cannot check the enumeration: nothing verifies the listed kinds all exist, or flags a fifth entity whose prose claims to be a
Node but was never listed.
Possible shape
A subtypeOf: Node field on the entity (or a subtypes: [...] list on the parent, mirroring the declare-from-the-parent convention for relationships). Lint checks that fit the existing style: warn when a backticked "is a X" phrase appears in a definition with no declared subtype link; render the fan in the ER output; treat parent-entity invariants as covering subtypes for the completeness checks.
Workaround today
Prose in the parent entity's definition, repeated per kind, with none of it checkable.
The gap
A relationship is
{entity, cardinality, role, ownership, note}. There is no way to say one entity is a kind of another. Generalization is a bread-and-butter domain-modeling construct, and models hit it early.Motivating example, from modeling a diagram tool's scene graph. The model has a
Nodeentity and four kinds of node:The "is a kind of" claim lives only in definition prose. Three costs:
ShapeandNodeappear unrelated.Node(unique id, single parent) do not formally bind toContainer,Shape,Arrow, orLabel.Nodebut was never listed.Possible shape
A
subtypeOf: Nodefield on the entity (or asubtypes: [...]list on the parent, mirroring the declare-from-the-parent convention for relationships). Lint checks that fit the existing style: warn when a backticked "is aX" phrase appears in a definition with no declared subtype link; render the fan in the ER output; treat parent-entity invariants as covering subtypes for the completeness checks.Workaround today
Prose in the parent entity's definition, repeated per kind, with none of it checkable.