Re: My honours project - databases using dynamically attached entity-properties

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andrew Hammond <andrew(dot)george(dot)hammond(at)gmail(dot)com>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: My honours project - databases using dynamically attached entity-properties
Date: 2007-03-13 00:05:13
Message-ID: 45F5EAB9.9000703@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Hammond wrote:
> On 3/12/07, Richard Huxton <dev(at)archonet(dot)com> wrote:
>> Josh Berkus wrote:
>> > I really don't see any way you could implement UDFs other than EAV that
>> > wouldn't be immensely awkward, or result in executing DDL at runtime.
>>
>> What's so horrible about DDL at runtime? Obviously, you're only going to
>> allow specific additions to specific schemas/tables, but why not?
>
> More to the point, since EAV is effectively smearing the semantics of
> DDL with DML, what, if any of the arguments against doing DDL at
> runtime don't apply equally to EAV? Well, aside from being able to say
> "hey, I'm not executing DDL at runtime". :)
>
> I see the issue as one of cost: it's substantially harder to implement
> DDL at runtime than to work around the problem using EAV. If that
> analysis is reasonable, then it would be a very interesting research
> project to see how to cut down that cost of implementation.

Well the cost depends on where/how complex the extra fields are. If
you're just talking about adding columns usercol01..NN with different
types and possibly a lookup to a single client_attributes table, it's
not difficult.

Of course, if inheritence worked fully, you could just have core and
user versions of relevant tables.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-13 00:38:11 Re: [COMMITTERS] pgsql: Make configuration parameters fall back to their default values
Previous Message Andrew Hammond 2007-03-12 23:57:26 Re: My honours project - databases using dynamically attached entity-properties