Re: Question re: relational technique

Поиск
Список
Период
Сортировка
От chester c young
Тема Re: Question re: relational technique
Дата
Msg-id 20060312172903.6034.qmail@web54305.mail.yahoo.com
обсуждение исходный текст
Ответ на Question re: relational technique  (Robert Paulsen <robert@paulsenonline.net>)
Ответы Re: Question re: relational technique  (Robert Paulsen <robert@paulsenonline.net>)
Список pgsql-sql
--- Robert Paulsen <robert@paulsenonline.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 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Weimao Ke
Дата:
Сообщение: Re: pgsql aggregate: conditional max
Следующее
От: Robert Paulsen
Дата:
Сообщение: Re: Question re: relational technique