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 1sp5ba-00GQK2-82 for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2024 12:40:55 +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 1sp5bZ-002M8X-Ty for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2024 12:40:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sp5bZ-002M8O-Ig for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2024 12:40:53 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sp5bW-000zLf-03 for pgsql-general@postgresql.org; Fri, 13 Sep 2024 12:40:52 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 4C3902A14D6 for ; Fri, 13 Sep 2024 05:40:49 -0700 (PDT) Date: Fri, 13 Sep 2024 05:40:49 -0700 (PDT) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: DDL issue In-Reply-To: Message-ID: References: <91bda8-3bdb-d93-6c17-41a03a3de27a@appl-ecosys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 13 Sep 2024, Muhammad Usman Khan wrote: > To handle this situation in PostgreSQL, you can model the data in a way > that maintains a single entry for each owner in the people table while > linking the owner to multiple dairies through a separate dairies table. > This is a typical one-to-many relationship (one person can own many > dairies). The following is testing scenario which might help you Muhammed, Thank you. There are a number of industries (most involving natural resources) so the one-to-many table will be more general. Regards, Rich