Re: Code tables, conditional foreign keys? - Mailing list pgsql-general

From Conrad Lender
Subject Re: Code tables, conditional foreign keys?
Date
Msg-id 4A187C15.9090909@gmail.com
Whole thread Raw
In response to Re: Code tables, conditional foreign keys?  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: Code tables, conditional foreign keys?  (Lew <noone@lwsc.ehost-services.com>)
Re: Code tables, conditional foreign keys?  (Joseph Conway <mail@joeconway.com>)
List pgsql-general
On 23/05/09 09:34, Scott Marlowe wrote:
> I have a great deal of respect for Celko.  I don't always agree with
> everything he says, but most of it makes a lot of sense to me.

I didn't intend any disrespect to Joe Celko. I have read a number of his
articles, which tend to be well written and informative. Last year, when
I posted to comp.databases asking for advice on whether to refactor that
table, he wrote "You will have to throw it all out and start over with a
relational design", "Throw away the idiot who did the EAV. This is not a
good design -- in fact, it is not a design at all", and "This is basic
stuff!!" Then he copied the same EAV example that was linked earlier by
Rodrigo, claiming that "someone like me" had suggested it. With all the
respect I have for Mr. Celko, that was hardly helpful, as that example
and the situation I had described were quite different. It also did not
encourage me to follow his advice and start from scratch (and fire my
boss, who was the mentioned "idiot").

I understand the problems that can arise from bad design choices, and I
know that Celko is vehemently opposed to anything that resembles EAV,
but I felt that in our case "throwing it all away" would be excessive.
We had safeguards to ensure referential integrity, and keeping the
values in the same table allowed us to let users manage them all with
the same form. So I guess it's like Stefan Keller said in a different
thread today: "Know when to break the rules."


  - Conrad

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 8.3: timestamp subtraction
Next
From: "Dejan"
Date:
Subject: Can't start service but works from command line