Re: EAV (Re: Object-relational impedence)

From: topmind <topmind_at_technologist.com>
Date: Fri, 28 Mar 2008 16:40:12 -0700 (PDT)
Message-ID: <4e4a20a0-4e5b-4778-bb9f-41a169ea391e_at_s37g2000prg.googlegroups.com>


Eric wrote:
> On 2008-03-20, topmind <topmind_at_technologist.com> wrote:
> >
> >
> > David Cressey wrote:
> >> "Eric" <eric_at_deptj.demon.co.uk> wrote in message
> >
> >> >
> >> > EAV is a way of misusing an RDBMS, and could be used for any subject
> >> > domain - and your schema description sounds like EAV.
> >
> > EAV (attribute/value pair tables) is not always bad. It is one
> > approach to allowing user-definable "columns" and/or times when
> > dynamicy is needed so that a DBA does not have to do the new-column-
> > shuffle all the time.
> >
> > I agree it can be a performance killer in some circumstances, but
> > often that's the tradeoff for flexibility.
> >
>
> It _might_ be OK as an extension to a properly designed core, otherwise
> I think the price is too high. There are other ways to do the
> flexibity bit.

I'd like to see examples. If you mean that common attributes are kept in "common" tables and only somewhat obscure or unpredictable stuff be put in EAV's, then I agree. However, the cost of moving items from EAV's to the common table(s) can be tricky to handle in applications. That's one reason why I wish somebody would build the Dynamic Relational DB system mentioned. It would eliminate the commonTable-or- EAV decision discontinuity. The column-or-row forced decision would then be yesteryear.

>
> And Mr Perryman's app sounded like pure EAV anyway.

Maybe his domain really needed an EAV (without knowing more about his domain), or at least flexible user-addable columns. If so, I wish he'd build the DR mentioned above instead of make a home-rolled OODBMS. I think there is a real need for DRDBMS for some domains/situations.

(Some say the DR is an OODBMS. I disagree, but maybe we could call it a hybrid to avoid a definition battle. It is kind of an OODBMS that requires tables and uses predicates. These two are not normally features of OODBMS, at least not required ones. IMO, it's closer to a RDBMS with optionally-relaxed features rather than an OODBMS with relational-like features.)

>
> E.

-T- Received on Sat Mar 29 2008 - 00:40:12 CET

Original text of this message