I have my objects with their properties. Objects could change their structure: properties may be added/removed/changed. Objects could be absolutely dropped. So object's metadata (description, classes, call them like you want :) )could be changed.
The database should store objects schemas and instances of these objects.
What's the best way to organise a relational database structure to store data mentioned above?
Currently I see only two ways:
- Store objects schemas in a few tables: schema general data,schema properties, possible properties types. Store instances in their tables: instance general data, a few tables - per each type from possible properties types table to store instance properties data. And so on.
- store objects schemas like in p1 but store instances like XML files in one table: one table for general instance info and one table with instance XML.
please, don't ask why/for what I need this. Just need to store custom objects and DB should work fast :)