Re: Design database schemas around a common subset of objects

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Design database schemas around a common subset of objects
Date: 2021-11-08 01:10:06
Message-ID: dfee5bbf-9ac9-034-ac85-2917437b97e7@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Serov 2021-11-08 03:42:10 Re: Question: Is it possible to get the new xlog position after query execution?
Previous Message Erik Wienhold 2021-11-08 00:14:34 Re: Design database schemas around a common subset of objects