Re: Looking for a discussion about generic datamodels

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 2 Sep 2005 10:26:24 -0700
Message-ID: <1125681984.589793.23470_at_f14g2000cwb.googlegroups.com>


Roy Hann wrote:
> There are innumerable reasons to object to it, and I look forward to seeing
> some of them rehearsed here, for convenient reference. I will get the ball
> rolling with my personal favourite: take the hardest query you ever wrote
> against a "properly" designed database, and try re-writing it for one of
> these designs. If that's too hard, try a simpler query. Keep relaxing the
> difficulty until you can discover one you actually can rewrite. That is
> will be the limit of what you can do with this approach.

This becomes the moot point with PIVOT/UNPIVOT operators. Translating complex queries is straightforward: take EAV "schema", unpivot it into the proper relational schema, query it, pivot the result back.

Next comes the performance issue. Clearly, in order for EAV to have something as basic as multicolumn index, it has to materialize the EAV data unpivoted into normal relations. Therefore, in principle, it is possible to have the data stored as EAV with materialized views making the data appeared as relations. There are a lot of techinicalities, however. For example, materialized views have to be incrematelly refreshable (refresh fast on commit). Then, what about concurrency? MVs are notorious for low transaction throughput. Received on Fri Sep 02 2005 - 19:26:24 CEST

Original text of this message