Edward, Heikki,

> In my experience, EAV
> schemas are usually result of improper database design by someone not
> understanding the relational theory and the principles of normalization.

Edward, you should be aware that EAV schema are a source of disagreement among 
database designers.  Some developers like Heikki and David Fetter hate them, 
and other like me use them frequently when the application business logic 
warrants it -- primarily cases where each item has a variable number of 
attributes and a large number of the attributes are null for most items, or 
when the application is expected to define new attributes which can't be 
anticipated by the database designer.

No matter how much Heikki hates them, I think he'd agree that EAV tables are 
better than having the application execute DDL at runtime.  ;-)

> > What I'd basically like to know is
> > a) Is this problem worth solving?
> > b) Is there already a good solution (particularly, within PostgreSQL)?

It's pretty easy to do EAV ad-hoc using existing tools.  I'm not clear on what 
you're planning to implement that's not already available.  Could you be more 

Josh Berkus
PostgreSQL @ Sun
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to