A
Aaron
I have been working on a database for an online store that carries a wide
variety of product types.
I was pointed to sub-classing to resolve the issue of two product types
having data that applied only to their type (ex pens need to store whether
they are a ballpoint or roller-ball and that obviously doesn’t apply to hats
which records hat size that doesn’t apply to pens).
But, how can I design a sub-classing structure to allow for products that
aren’t hats or pens, but some unknown 3rd product type to be added in the
future?
I would just add the tables in the future, but then I'd need to re-write
parts of the application that acts as the front end to the user to recognize
these new tables, and that’s what I'm trying to avoid.
variety of product types.
I was pointed to sub-classing to resolve the issue of two product types
having data that applied only to their type (ex pens need to store whether
they are a ballpoint or roller-ball and that obviously doesn’t apply to hats
which records hat size that doesn’t apply to pens).
But, how can I design a sub-classing structure to allow for products that
aren’t hats or pens, but some unknown 3rd product type to be added in the
future?
I would just add the tables in the future, but then I'd need to re-write
parts of the application that acts as the front end to the user to recognize
these new tables, and that’s what I'm trying to avoid.