Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnQ17-00AsV9-TP for pgsql-sql@arkaria.postgresql.org; Mon, 02 Oct 2023 20:59:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qnQ16-00HI5R-Jk for pgsql-sql@arkaria.postgresql.org; Mon, 02 Oct 2023 20:59:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnQ16-00HI54-5b for pgsql-sql@lists.postgresql.org; Mon, 02 Oct 2023 20:59:48 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qnQ13-007r5P-Q0 for pgsql-sql@postgresql.org; Mon, 02 Oct 2023 20:59:46 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1e1b1b96746so103808fac.2 for ; Mon, 02 Oct 2023 13:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696280265; x=1696885065; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=sf9nbIML3NCLlnDgMIyCkoLbFx1NlH4lVgYSV27tAGA=; b=P5cGJrk81aodKLnXyKzi4jY1jTaXHdNcUrJjhIa9wnL/EX/peZbIjzjhxRKPg31JOd RxiHjb9TAczqodvHqYcCezl12zTPIm20cf2FK9qkYO9Lg2c2GEcTbKbekMOJ8iSKtReQ yQAUnIgxjlfq19hhPWTky9CQwjkaIGVZHZLCzCpkTbv2n4OYn92b+tLQB/oYsOsotPYc 2Pbt8W9UJCbxjeMOYVNWt+dcatwQYa2vdTcbnJ9a056HJ/d+u4Ew5WQv2dAP/JMhGuQj At+jNThQn/Fc0RiBzJC2RuxRPbUFjwE/U5hwh0j6oO1VaMynSNgj5+4SU+Vt/k5PRu8n 9KyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696280265; x=1696885065; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sf9nbIML3NCLlnDgMIyCkoLbFx1NlH4lVgYSV27tAGA=; b=m+DKYjt/vk7MVgrAV3QjR+DkoVQhVxdZkStV/2eeP4pj0XwedSyYvBU4769Row5oNf XKB6LAj3wtyBXzq6lhDWo1S77ZIPfUh+jMSFeKzl9zTe69wC3dzX/CI1G0LoDudEl3VE XDp9U4OWU+4gy/Xl84fVwxBTl8IcwLTdJ0exEg2C0XZ1vQwkxCLxOTET8XK4ffbncggZ a3qNaijcCQ3f9Vxxu9XkxytC2ea6pKvF49tptKrT/rPmOk85MFlQR9/BF4lvPMsxHOhb WyiUQSwDfebjb00cMqkbj3fM8K1oGcBFsJgRpQ74WEvXZjDLvB/tW1wZlg+ikxG0mFjs MjLg== X-Gm-Message-State: AOJu0YzAWfzQNPbpARiuroo6Bxq4Ly3spXQAfWNu7yK2Uq1OaNbSKSPW WTK3iJGj1C5HwmIr9D4SfygXvAyqlPWPaFRtvfjixsYyI8XAiw== X-Google-Smtp-Source: AGHT+IEX6s48oI7fff3PQDbh6//5er04BeQcrHOLGu6YFo0gmWK27fhBrgMM3bB3x+Urih4vnbIwj+9QQv5UsFajl9w= X-Received: by 2002:a05:6870:32ca:b0:1d6:52ff:9652 with SMTP id r10-20020a05687032ca00b001d652ff9652mr14920329oac.29.1696280264979; Mon, 02 Oct 2023 13:57:44 -0700 (PDT) MIME-Version: 1.0 From: JORGE MALDONADO Date: Mon, 2 Oct 2023 15:57:32 -0500 Message-ID: Subject: A situation with one parent table and 3 child tables To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary="000000000000a23af00606c206b1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a23af00606c206b1 Content-Type: text/plain; charset="UTF-8" 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 --000000000000a23af00606c206b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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:<= /div>

* 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 th= e table_p will link to records of table_ch3
At first look, this does not make very much sense to me. I thou= ght about considering 3 parent tables, one for each child table. However, t= he 3 parent tables would have the same exact structure and I would like to = know if there is a workaround=C2=A0for this issue.

Thanks in advance.

Jorge Maldonado
--000000000000a23af00606c206b1--