Re: Partial foreign keys, check constraints and inheritance

Поиск
Список
Период
Сортировка
От Eric E
Тема Re: Partial foreign keys, check constraints and inheritance
Дата
Msg-id 437CFFA9.3070905@gmail.com
обсуждение исходный текст
Ответ на Re: Partial foreign keys, check constraints and  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
Scott Marlowe wrote:

>On Thu, 2005-11-17 at 13:36, Eric E wrote:
>
>
>>Eric E wrote:
>>
>>
>>
>>>>maybe you can solve it adding a new col and allow both to contain
>>>>null values.
>>>>
>>>>if these are not mutually exclusive you can avoid a check if they are
>>>>check that if one has a non-null value other has null...
>>>>
>>>>
>>>I did think about that, but I disliked the idea of two fields of nulls
>>>for every one full field.... maybe it's not as bad a way of doing it
>>>as I thought.
>>>
>>>
>>BTW, in most cases I have 5+ tables to do this, so that's 4+ fields of
>>
>>
>null in each row...Could you use some kind of intermediate join table, so that it pointed
>to orders and then products / customers / othermidlevel tables pointed
>to it, and so did the problems table?
>
Clever - that intermediate table sounds like sort of a GUID for every
element in the database, along with what table it belongs to, and the
problems table points at that GUID.  Sounds pretty promising.  Thanks
for the idea.

EE

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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: Rebranding PostgreSQL
Следующее
От: Aaron Glenn
Дата:
Сообщение: Re: [Fwd: Sun backs open-source database PostgreSQL | Topic: "everything" | ZDNet News Alerts]