[noob warning!] I need to store some data in some tables where it is like the equivalent of an array of pointers to polymorphic objects. E.g. (pseudo C++)
struct MyData { string name; }
struct MyDataA : MyData { int a,b,c; }
struct MyDataB : MyData { string s; }
MyData * data[100];
I don't really know what google search to enter! How would you store info like this in an SQL database?
My random thoughts:
- I could have one table with a column that is the struct identifier and then have redundant columns, but this seems wasteful.
- I can have one table for each struct type. These would have a foreign key back to the master array table. But, how do I point to the struct tables?