Recognises a polymorphic association
One reference attribute pointing to different entities depending on the value of a type attribute. There is no single parent, so the relationship has no cardinality, no optionality and no rule, and the physical model cannot declare a foreign key. A specific form of row 6.
Can AI do this?
Not tested yet
No AI benchmark covers this knobit yet. New results are announced in the Can AI Do the Job? newsletter.
What it looks like in practice
Expected result: The reference attribute, its type attribute and the entities it points to
How it is assessed: Flags the deficient case and passes the acceptable one. Deficient: Case Note with Owner Id and Owner Type (ACCOUNT, PAYMENT, PARTY) Acceptable: One relationship per parent (Case Note → Account, Case Note → Payment), each with its rule, plus a rule that exactly one is set; or a supertype the parents share, only if they pass row 27's test (LOG-012 when Owner Id has the foreign-key role; review only otherwise)
Also known as: Polymorphic association (logical model)
Related knobits
Builds on
All 56 knobits of Derive the logical data model.
Source: Review checklist 05-logical, row 22; Karwin, Polymorphic Associations; E&N ch. 4 (union types)