Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjtAq-0004zV-B4 for pgsql-general@arkaria.postgresql.org; Mon, 08 Nov 2021 01:10:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mjtAo-0001ZN-UK for pgsql-general@arkaria.postgresql.org; Mon, 08 Nov 2021 01:10:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjtAo-0001ZE-Iv for pgsql-general@lists.postgresql.org; Mon, 08 Nov 2021 01:10:10 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjtAl-0001pk-MQ for pgsql-general@lists.postgresql.org; Mon, 08 Nov 2021 01:10:09 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 964902A0109 for ; Sun, 7 Nov 2021 17:10:06 -0800 (PST) Date: Sun, 7 Nov 2021 17:10:06 -0800 (PST) From: Rich Shepard To: "pgsql-general@lists.postgresql.org" Subject: Re: Design database schemas around a common subset of objects In-Reply-To: <1116172276.274316.1636330474638@office.mailbox.org> Message-ID: References: <766855348.80521.1636243329249@office.mailbox.org> <8555f244-6bc0-51b0-9143-8caeaed150a7@aklaver.com> <1116172276.274316.1636330474638@office.mailbox.org> 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 Mon, 8 Nov 2021, Erik Wienhold wrote: > One thing I already know that may differ is how modelled objects are named > in the real world. We deal with plots of land, hence the geographic data. > Depending on the region, these plots may use different naming schemes > relevant to legal documents. The core objects would use a generated > surrogate key but each project would have a dedicated relation that maps the > real-world names of those plots to their surrogate keys. The real-world > names can be normalized into multiple attributes instead of just storing > names as text. This normalization may vary between projects, e.g. different > number of attributes. Erik, How about a table 'plot' that holds the real-world name with an abbreviation (as the PK) and other information relevant to plots? That seems to be what you're describing above but explained differently. Land plots, like othter geographic locations, always have surrogate keys because there's no natural key associated with it. I use site_nbr, samp_nbr, and similar PKs because there's nothing inherently associated with those attributes. Here in the US using SSN (social security numbers) for people are a natural key as is the VIN (vehicle identification number) for ... vehicles. Rich