Database Structure to store multiple inheritance classes
问题 I have two distinct (no inheritance) interfaces: IInvestable and IPricable and two classes: IndexClass and FundClass that are stored in seperate tables in my DB. IndexClass is IPriceable FundClass is IPriceable and IInvestable . I need a table to store prices against an IndexClass and a FundClass I need a table to store that FundClasses are invested in. One way might be to have two tables: Pricable and Investable which just have an ID column. Then have a foreign key on IndexClass : PricableID