Re: design question
From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 08 Sep 2008 08:23:49 -0700
Message-ID: <1220887428.774675@bubbleator.drizzle.com>
>
> Oh nice. I was not the first with this problem ;)
> But this link describes B as an "improvement" of A.
> Thus both A and B are bad?
>
>
> Ok, these are complex queries.
>
>
> OK.
>
>
> This would mean at least one table for each type of object, doesn't it?
Date: Mon, 08 Sep 2008 08:23:49 -0700
Message-ID: <1220887428.774675@bubbleator.drizzle.com>
Chris Seidel wrote:
> William Robertson wrote:
>
>> No offence, but option A is not only an astonishingly terrible idea, >> but a well known astonishingly terrible idea. It's actually one of the >> classic astonishingly terrible ideas. For example, see >> http://oracle-wtf.blogspot.com/2006/02/eav-returns-concrete-elephant-approach.html
>
> Oh nice. I was not the first with this problem ;)
> But this link describes B as an "improvement" of A.
> Thus both A and B are bad?
>
>> What if you want all rows containing both "Hello" and "Foo"? What if >> you want unique or foreign key constraints?
>
> Ok, these are complex queries.
>
>> It's a fact of life that >> unconstrained data gathers incorrect values as time goes on.
>
> OK.
>
>> My advice would always be to do the data >> modelling properly and design an interface such that the model is >> separate from the client application and presentation logic.
>
> This would mean at least one table for each type of object, doesn't it?
Sounds like you missed the class on normalization. Here it is in short form.
http://www.psoug.org/reference/normalization.html
and read this too.
http://www.psoug.org/reference/codds_rules.html
Ideally you should be somewhere between at a minimum of 3NF and 5NF may be better from an academic standpoint but not performance so don't go there.
-- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Sep 08 2008 - 10:23:49 CDT