public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thiemo Kellner <[email protected]>
To: [email protected]
Subject: Re: Lookup tables
Date: Wed, 5 Feb 2025 21:15:41 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
El 05-02-25 a las 19:13, Michał Kłeczek escribió:
>> Only if you do not see the primary key as the main immutable value identifying an object, entity, you name it.
> Surrogate key cannot identify any (real) object by definition :)
> What object is identified by PK value 42 in “restaurants” table?
What object is identified by a PK value "löasidfhaösliw" in a restaurant
table? It is the context only giving it sense and not less sense then 42
or "Pizza Hut". In fact on disk, you won't even find 42 or "Pizza Hut".
On hard disks, e.g., it is the direction of a magnetic field of several
locations on the disk. Btw, 42 seems to me a quite geeky name for a nerd
restaurant.
>> Having said that, it is very questionable that a natural key (names to name one) can be a suitable primary key (think of typo).
> Typos are indeed a problem but adding surrogate key does not solve it, I’m afraid.
In how far does it not solve it? Or maybe better asked. Is your problem
that typos occur or is the problem the amount of hassle to fix it?
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]
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