Those solve different problems. The first solves the IS-A problem and is the cumbersome and error-prone solution I was referring to. The second solves the problem of a large number of optional attributes and is an alternative to having dozens of columns in your main table, most of which are NULL for any given row.
in reply to Re^3: OO concepts and relational databases
in thread OO concepts and relational databases
There have been situations where I will use both solutions for different issues in my design. In fact, you can use both solutions for the same tables, if you need it.
And, the two solutions can be considered interchangeable, for a limited subset of IS-A problems. But, the second solution becomes very unwieldy for most IS-A problems.
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested