4 ms·
You make a fair point about actual payloads. My example was illustrating a sum type of unit types, an enum. Do you care to conjure a more complete example of y
by alexvoda 5y ago
You make a fair point about actual payloads. My example was illustrating a sum type of unit types, an enum.
Do you care to conjure a more complete example of your solution? As @throwaway894345 said, I believe your solution is difficult to consume. I would like an example with something more concrete than MyTable.
A theoretical elegant but currently impossible solution to consume your solution would require FKs pointing to views. A view called Shape that is a Union All (we know there are no common elements) over the 5 WithShape... tables. Other tables would point FKs to the PK of this View. Unfortunately, AFAIK there is no DBMS that supports FKs to Views.
I do believe this is not really what you have in mind and I have a hunch about what you are trying to get at, but I believe the example is incomplete.