Re: Modeling question...

From: Volker Hetzer <>
Date: Thu, 11 Sep 2008 19:29:10 +0200
Message-ID: <gabkgv$1rn$>

JOG schrieb:

> On Jul 25, 3:33 pm, Volker Hetzer <> wrote:

>> JOG schrieb:
>>> On Jul 25, 3:05 pm, Volker Hetzer <> wrote:
>>>> Bob Badour schrieb:
>>>>>>> Ooooh! Reinventing EAV with levels...
>>>>>> Possibly. I had a look at
>>>>>>'t find
>>>>>> anything exciting.
>>>>>> All my attributes (key value pairs) are (for the purpose of this
>>>>>> discussion) strings, so the Data tables hierarchy ends with
>>>>>> EAV_Objects in the first image of that link.
>>>>>> My problem is that, that I haveTest three different "Objects_1"
>>>>>> tables and I'd like to avoid having to replicate the EAV_Objects-Table
>>>>>> for each "Objects_1"-Table.
>>>>>> OTOH, I could have the "level" entities all be children of an id table
>>>>>> and
>>>>>> put the key value pairs into a child of that table. I need to try this
>>>>>> out.
>>>>>> Thanks for providing the pointer!
>>>>>> Volker
>>>>> Just to be clear, I was more than offering a pointer. I was also
>>>>> ridiculing the idea of EAV.
>>>> I got that. :-)
>>>> But "we want to be able to create and delete attributes" is a customer
>>>> requirement. I think it's different from "I am too lazy to do a proper data
>>>> model". There are plenty of "normal" attributes left to model ERD like.
>>>> Lots of Greetings!
>>>> Volker
>>>> --
>>>> For email replies, please substitute the obvious.
>>> What's wrong with drop/add column?
>> All the things that are wrong if an application requires DDL during its normal
>> state. No undo, no scalability, limits on the number of attributes, limits on
>> the structure of the attribute names, the same attributes in each
>> project/pcb/etc. and so on.
> If one is changing trying to change the attributes that entities
> possess, than one is necessarily altering the propositions that can be
> stated about them. This necessitates a change in relation predicates,
> which means it is absolutely a DDL issue. To think otherwise seems to
> somewhat miss the point of the relational model.
Bit late but I was on holiday...
I am not trying to change the attributes that an entity possesses but I am allowing each business object or user object or whatever you may call it to contain an attribute collection. There are no changes in relation predicates since any attribute name is just contents, like its value.
I think we are talking at cross purposes.

I'm curious, what do you people do when a customer comes and says, "I want to store <thing> and I want to add, change and remove key value pairs and I want to name them freely.". Are you telling them that a database can't do it? That whatever the reason, it's stupid? That no more than 255-minus-housekeeping attributes are allowed because, say, oracle can't do more columns? That no attributes can contain more than 22 or whatever characters? What do you say when they ask the some intern and he comes up with a <thing_id>,<attribute_name>,<attribute_value> table attached to the <thing> table by a one-to-many relation and tell you this is what they want?

Lots of Greetings!

For email replies, please substitute the obvious.
Received on Thu Sep 11 2008 - 19:29:10 CEST

Original text of this message