Re: Table design - reducing number of entities

From: Roy Hann <specially_at_processed.almost.meat>
Date: Fri, 2 Dec 2005 10:35:03 -0000
Message-ID: <J76dnYbiWNg3vg3eRVnyrg_at_pipex.net>


"frugalprogrammer" <sillydeveloper_at_gmail.com> wrote in message news:1133515466.259376.268000_at_g49g2000cwa.googlegroups.com...
> Or use a hash in the table to overload the common attributes (in other
> words, serialize them; Ruby on Rails uses yml data, but obviously
> others can be used as well). This allows you to store inheritance in
> the table. This obviously must be done judiciously, but I believe also
> strikes a middle ground instead of pulling tables out of a hat.

What do you mean by "pulling tables out of a hat"? Are you suggesting that there are two different ways of identifying entity types, one rational, one not?

I don't recognize that in myself. I just repeatedly apply the same rational analysis that I sketched earlier and I end up with lots of tables. I don't magic extra ones into existence, they just follow inescapably once I am persuaded that tables (relations) are a good idea to begin with.

In any case, sub-typing (my analogue to your inheritance) can be made blindingly obvious in a diagram by using an appropriate symbol for a distributed key constraint. And I would infinitely prefer to glance at a picture than study code. But maybe that's just me...

Roy Received on Fri Dec 02 2005 - 11:35:03 CET

Original text of this message