Re: One parent record with 3 possible child records

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
Subject: Re: One parent record with 3 possible child records
Date: 2024-05-02 18:28:42
Message-ID: 72955C51-7E22-4BA7-93C1-2C4D99D37ED9@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gotcha, thanks


On May 2, 2024, at 8:03 AM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:





On Thu, May 2, 2024 at 6:37 AM Rob Sargent <robjsargent(at)gmail(dot)com> wrote:







Presuming the id is unique in parent and child, what’s the value of the type field in the foreign key?  Are you saying the PK on tableMain is (type,id), perhaps for clustering purposes?










Preventing the parent record from saying "tblOne" while the actual ID value is present on "tblTwo".




David J.





In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Nic Mitchell 2024-05-02 22:47:46 Re: One parent record with 3 possible child records
Previous Message Sanjay Minni 2024-05-02 15:12:42 Re: One parent record with 3 possible child records