Re: Question of Table Design and Foreign Keys

Поиск
Список
Период
Сортировка
От David Pratt
Тема Re: Question of Table Design and Foreign Keys
Дата
Msg-id BD59D321-D1F1-11D9-AEE7-000A27B3B070@eastlink.ca
обсуждение исходный текст
Ответ на Re: Question of Table Design and Foreign Keys  ("Jason Minion" <jason.minion@sigler.com>)
Список pgsql-admin
Hi Jason, many thanks Jason for your reply.

On Tuesday, May 31, 2005, at 11:25 AM, Jason Minion wrote:

> I think the way you want to look at it is: if a record exists in
> sample_attributesjoin, then it needs to reference both samples
> and attributes. You don't need to worry about samples or attributes
> being "off" because they don't have "enough" references, instead
> you want to ensure that if a record exists (whether inserted,
> updated, or references are deleted) in sample_attributesjoin
> that the sample_id and attribute_id are always valid.
>

Yes, this is what I was thinking but just needed to ensure this was the
right approach since I have a number of tables and similar
circumstances.  So if there is no attributes for a sample record when I
  join the tables and query, I will just have nothing returned for these
records and no trouble with integrity, am I correct? When I up update
or delete records that I have added to attributesjoin, the referential
integrity of attributes and samples table is maintained using the
constraints, have I got this right?

Regards,
David

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

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: RHE v3
Следующее
От: ASIS Mexico Norte
Дата:
Сообщение: Foro Regional Especializado 2005 - Seguridad en el Autotransporte