Skip to main content
added 1 characters in body
Source Link
p.marino
  • 6.3k
  • 3
  • 27
  • 37

I would go for the "create a table for the common properties and then a table for each of the specialized versions" method, personally.

Reason: you say that your implementation will be done in a RDBMS and this is non-negotiable. Fine. Dumping unstructured, blob-like stuff like a serialized hashtable in a DB field goes against the design philosophy of RDBMS though, so you will have a severe hit on efficiency unless you are ok with the idea of treating the extended_properties field as an opaque blob, just like a gif or another binary object.

In other words, forget querying (efficiently) for "all the objects having extended property COLOR=REDCOLOR=RED".

The problem you have (describing OO taxonomies in a RDBMS) is definitely not new. Have a look at this, for a in-depth description of the options.

I would go for the "create a table for the common properties and then a table for each of the specialized versions" method, personally.

Reason: you say that your implementation will be done in a RDBMS and this is non-negotiable. Fine. Dumping unstructured, blob-like stuff like a serialized hashtable in a DB field goes against the design philosophy of RDBMS though, so you will have a severe hit on efficiency unless you are ok with the idea of treating the extended_properties field as an opaque blob, just like a gif or another binary object.

In other words, forget querying (efficiently) for "all the objects having extended property COLOR=RED.

The problem you have (describing OO taxonomies in a RDBMS) is definitely not new. Have a look at this, for a in-depth description of the options.

I would go for the "create a table for the common properties and then a table for each of the specialized versions" method, personally.

Reason: you say that your implementation will be done in a RDBMS and this is non-negotiable. Fine. Dumping unstructured, blob-like stuff like a serialized hashtable in a DB field goes against the design philosophy of RDBMS though, so you will have a severe hit on efficiency unless you are ok with the idea of treating the extended_properties field as an opaque blob, just like a gif or another binary object.

In other words, forget querying (efficiently) for "all the objects having extended property COLOR=RED".

The problem you have (describing OO taxonomies in a RDBMS) is definitely not new. Have a look at this, for a in-depth description of the options.

Source Link
p.marino
  • 6.3k
  • 3
  • 27
  • 37

I would go for the "create a table for the common properties and then a table for each of the specialized versions" method, personally.

Reason: you say that your implementation will be done in a RDBMS and this is non-negotiable. Fine. Dumping unstructured, blob-like stuff like a serialized hashtable in a DB field goes against the design philosophy of RDBMS though, so you will have a severe hit on efficiency unless you are ok with the idea of treating the extended_properties field as an opaque blob, just like a gif or another binary object.

In other words, forget querying (efficiently) for "all the objects having extended property COLOR=RED.

The problem you have (describing OO taxonomies in a RDBMS) is definitely not new. Have a look at this, for a in-depth description of the options.