Re: Database schema for univesal usage
Date: 10 May 2005 15:10:10 -0700
Message-ID: <1115763010.494596.146010_at_o13g2000cwo.googlegroups.com>
Kenneth Downs wrote:
> lauri.pietarinen_at_atbusiness.com wrote:
>
> >
> > My reasoning that DB2 is more general than DB1 rests on the fact
that
> > DB2 can contain any information that DB1 can contain but not vice
> > versa.
> > Additionally, by adding constraints in the database or in the
> > application program DB2 can be made to contain exactly the same
> > information as DB1.
> > It does not work the other way around.
> >
> > Well, thats my reasoning.
> >
>
> What you say is correct, but if you were putting together an app to
track
> cell phones, then for one EIN record there would be exactly one and
only
> one phone #. Putting in a child table requires a constraint plus a
join to
> retrieve the column, when there will always only be one value.
Occam's
> razor cuts off the child table and puts the column into the first
table.
I agree. Which approach you choose depends on what you want out of it. I think the reasoning behind the "super schema" that can hold "anything" is that we don't know what kinds of requirements we will have in the future so we should build some flexibility into the schema. Taken to the extreme you get the OneBigTable approach which gives you everything and nothing, since you can put anything into it, but you have to code the "meaning" of the database into the application.
Regards,
Lauri Pietarinen
Received on Wed May 11 2005 - 00:10:10 CEST