Re: Mapping arbitrary number of attributes to DB

From: JOG <jog_at_cs.nott.ac.uk>
Date: 26 Oct 2006 03:05:06 -0700
Message-ID: <1161857106.433280.305340_at_b28g2000cwb.googlegroups.com>


Sampo Syreeni wrote:
> On 2006-10-25, Bob Badour wrote:
>
> > You are begging the question.
>
> I believe the problem is the cost of up front modeling. I claim that it
> is sometimes solved by postponing the effort while storing the data,
> which means that the data will not be fully structured in the meanwhile.
> EAV on top of an RDBMS is one means of storing such semistructured data.

What /exactly/ do you mean by 'semistructured data' Sampo? I see this term bandied around a lot, but am yet to see a clear explanation of what it /is/. I've heard that it is data that doesn't fit into the RM, but AFAIK all data fits in the RM, so I find this highly suspect. Ta, J.

> Hence, there is a limited justification for using EAV or some similarly
> less-than-relational data representation. How is this circular?
>
> > A dbms will allow one to dump each file into a relation that directly
> > reflects the structure of the file. That doesn't cost a whole lot in
> > terms of designing, and it does accomplish exactly what you describe
> > above.
>
> Correct, but how precisely is that better than EAV? Suppose you've
> progressed far enough to know that your users are going to be needing
> trend reports on the sensor data that is present in field #1 of the
> files produced by instrument A and in a different form in field #2 of
> instrument type B. You can somehow tell the instruments apart (e.g. by
> one of the attribute values or by the set of attributes present) ,
> you've added an attribute in your core data model and you've implemented
> functions to convert the raw data into a uniform representation. You now
> need to move the data into the real schema. Which representation do you
> think makes this easier, EAV or mass-of-relations, if you're using plain
> SQL on the one hand, or the best existing tools for the model on the
> other? Which model reacts better if one of the sensors is upgraded to
> produce a new field? What happens when one of the fields has
> substructure which needs to be preserved?
> --
> Sampo Syreeni, aka decoy - mailto:decoy_at_iki.fi, tel:+358-50-5756111
> student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
> openpgp: 050985C2/025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Received on Thu Oct 26 2006 - 12:05:06 CEST

Original text of this message