What's the best way to store custom objects in relational database?
Posted
by user342610
on Stack Overflow
See other posts from Stack Overflow
or by user342610
Published on 2010-05-16T22:25:36Z
Indexed on
2010/05/16
22:30 UTC
Read the original article
Hit count: 165
entities
|custom-object
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:
1) 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. 2) 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 :)
© Stack Overflow or respective owner