
I asked this question, and someone suggested this type of schema. I’m not familiar with how super/subtypes work. Can you show me a TSQL example of how I would create this database?
Another problem I’m having trouble wrapping my head around, is given an order, and a collection of items in that order, how would I know if an item is a Pizza, Beverage or Side dish?
Thank you.
Tables:
ITEM_SUPER_TYPE
ITEM_SUB_TYPE
ITEM
This way, the super type can be inferred from the subtype.