A situation with one parent table and 3 child tables - Mailing list pgsql-sql

From JORGE MALDONADO
Subject A situation with one parent table and 3 child tables
Date
Msg-id CAAY=A7_wHBKkKFxuxXc7A+fr3TYGmWS9-hCGghLRDcQAAa_wfQ@mail.gmail.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Sv: DDL in active production database
Next
From: Gareth Evans
Date:
Subject: Re: A situation with one parent table and 3 child tables