Re: Mapping arbitrary number of attributes to DB

From: JOG <>
Date: 25 Oct 2006 06:10:43 -0700
Message-ID: <>

Joshua J. Kugler wrote:
> David Cressey wrote:
> > PMFJI.
> >
> > Now that I see what you are up against, I have a better handle on why you
> > are perplexed.
> >
> > If I can generalize a little bit from what you've written here, you want
> > a
> > data model that will be impervious to changing information requirements.
> Actually, I just want a data model that can have a flexible number of
> attributes since various stations will have a flexible number of
> attributes. :)

I worry that you are conflating entity-attributes with tuple-attributes (proposition roles). Nevertheless my instinct would be to use something like the following:

STATION:1 has INSTRUMENT:thermometer with RECORDING:57 at TIME:25/10/06.
STATION:2 has an INSTRUMENT:wind_speed with RECORDING:120 at TIME:25/10/06.

If you went for a proposition attribute such as THERMOMETER_READING for every possible 'entity attribute' you would record a huge amount of facts with extremely varied structures (i.e. with very few commonalities between them from which to extract predicates from), and would hence end up with an unwieldly amount of tables.

> But I do understand the impossibility of preparing for every eventuality. I
> just want to be prepared for an eventuality I know will happen.
> j
> --
> Joshua Kugler
> Lead System Admin -- Senior Programmer
> PGP Key: ID 0xDB26D7CE
> --
> Posted via a free Usenet account from
Received on Wed Oct 25 2006 - 15:10:43 CEST

Original text of this message