Re: Question re: relational technique

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: Robert Paulsen <robert(at)paulsenonline(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Question re: relational technique
Date: 2006-03-12 17:29:03
Message-ID: 20060312172903.6034.qmail@web54305.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- Robert Paulsen <robert(at)paulsenonline(dot)net> wrote:

> One problem with the above is that the list of attributes is fixed. I
> am looking for a way to assign new, previously undefined, attributes
to
> items without changing the table structure. Is it ever appropriate to
do
> the following?
> ...

There are two ways for extending tables, one static and one dynamic.

Your scheme is dynamic. You will have problems with typing and
performance. What you really want is to be able to list more
attributes, similar to attributes attached to a tag in html.

If you want a base table that has, under different specified
conditions, extra attributes, there are better techniques. IMHO the
best solution is, for each condition, create a table containing the
primary table's id plus the extra attributes; then join that to the
base table; then write a view to cover it all; then write rules for
dml. Sounds difficult but a cake walk once you've done it a few times.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Robert Paulsen 2006-03-12 18:15:45 Re: Question re: relational technique
Previous Message Robert Paulsen 2006-03-12 17:11:17 Question re: relational technique