public inbox for [email protected]  
help / color / mirror / Atom feed
From: Karsten Hilbert <[email protected]>
To: [email protected]
To: PG-General Mailing List <[email protected]>
Subject: Re: Lookup tables
Date: Tue, 4 Feb 2025 17:51:14 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Am Tue, Feb 04, 2025 at 05:31:13PM +0100 schrieb Michał Kłeczek:

> It is now completely unclear what it means to change the name of the restaurant for already registered visits.
> Is it still the same restaurant with a different name or a different restaurant?
>
> Or let say someone swaps names of two restaurants.
> That means a user that goes to the same restaurant every day would register visits to two different restaurants!
>
> Using the name of a restaurant as primary key gets rid of these logical anomalies because
> the database model now reflects facts from reality.

Reality tends to become so ambiguous as to not be
reflectable (two entirely different restaurants eventually,
within the flow of time, carry the very same name).

A primary key is very likely not the proper place to reflect
arbitrary business logic (is it the same restaurant or not ?
what if two restaurants have the same name at the same time
?). Primary keys are tools at the technical level.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Lookup tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox