A situation with one parent table and 3 child tables

Поиск
Список
Период
Сортировка
От JORGE MALDONADO
Тема A situation with one parent table and 3 child tables
Дата
Msg-id CAAY=A7_wHBKkKFxuxXc7A+fr3TYGmWS9-hCGghLRDcQAAa_wfQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: A situation with one parent table and 3 child tables  (Gareth Evans <donotspam@fastmail.fm>)
Re: A situation with one parent table and 3 child tables  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-sql
Hi,

I have one parent table (table_p) with 3 child tables (table_ch1, table_ch2 and table_ch3). Each record of the parent table can be associated with 1 and only 1 child table records. This means that:

* Some records of the table_p will link to records of table_ch1
* Some records of the table_p will link to records of table_ch2
* Some records of the table_p will link to records of table_ch3

At first look, this does not make very much sense to me. I thought about considering 3 parent tables, one for each child table. However, the 3 parent tables would have the same exact structure and I would like to know if there is a workaround for this issue.

Thanks in advance.

Jorge Maldonado

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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Sv: DDL in active production database
Следующее
От: Gareth Evans
Дата:
Сообщение: Re: A situation with one parent table and 3 child tables