by TeMPOraL · 3y ago · 0 comments
There are no "natural keys". They don't exist in nature. They don't exist as a thing in our physical reality. And when it comes to human-assigned identifiers, it should be emphasized much more strongly that whatever external thing you think is a good unique ID, it isn't.
Names? Addresses? Dates? Nope - have you heard of the "Falsehoods programmers believe about..."?
Government IDs? Nope. US SSN was not designed to be used as UID from the start, but even when you have an identifier that was - like e.g. PESEL number in Poland - it's still not an unique ID, because people and computers make mistakes. Multiple people having the same PESEL is something that's been known to happen.
(Side note: "identification number" really means "opaque string". IDs are not numbers. If adding or multiplying them together doesn't make sense, they're not numbers.)
Anything business adjacent? Don't make me laugh. The article covered a lot of the reasons why any kind of tracking IDs are broken for the purpose - most of them dealing with the messy nature of reality - but businesses are businesses. They cut corners. They lie and cheat. That's why you see the same EAN code covering multiple products a store might even try and price differently. That's why SKUs get reused. That's why these days you often have multiple distinct products under the same SKU - first, quality batch, released to get early positive reviews, and then the main batch made with much cheaper and lower-quality parts. Product names? That's even worse - you'll have variations such as "extra batch of super-low-quality, reduced functionality, made specifically for Black Friday, so it can be sold under the same name as the OG product, seemingly at big discount".
This is not to say "never use other people's IDs". There's a trade-off here, but making a good choice starts with assuming that the external "unique ID" is neither unique, nor a good ID, and you'll have to deal with it at some point.
I would also tell myself not to use sequential numbers for surrogate keys. They're massively convenient, but a real pain later on (data security, and distributed data being just two cases.)
I know there are folks who like natural keys, but frankly IMO they're a straight-up bug. YMMV.
It seems to me that nature has plenty of natural keys, it’s human created constructs that don’t.
For example, the periodic table has natural keys.
It'll work fine until you find you want to keep track of U-235 and U-238 separately.
What constitutes identity is context-dependent. Yeah, on one level they're the same thing. On another they aren't.
Also it gets fun if you want to store anti-particles too.
And also elements aren't a thing, quantum fields are. This is why you sometimes see things that just don't fit the idea of distinct atoms. But then quantum fields also aren't a thing. We don't know what exactly is the thing. We only have increasingly sophisticated working models.
And I suspect it would be possible for us to JOIN our periodic table onto theirs by matching on the atomic number field to create a mapping between, say, our names for the elements and theirs.
That seems unlikely to be something we would be able to do with literally any other dataset that an alien civilization has. Their star catalog will contain many of the same objects ours does - but there won’t be an obvious key that lets us join them up.
I guess there’s a few mathematical objects that would work - the list of Platonic solids maybe, or the symmetry groups… but in terms of real world physical things? Atomic numbers might be the only truly natural key there is.
I think the periodic table was discovered, not invented. My guess is that whenever we communicate with some advanced alien species, the periodic table is going to be one of those things we share.
You could argue Mathematics is a human construction. But at that point, isn't every concept a human construction? In that case it is hardly helpful, or meaningful to say a concept is a human construct, since all concepts are.
Eeehhh I'm not sure if this necessarily true. A telephone number is definitely a number but addition doesn't make all too much sense on them.
If you want to specifically talk about objects that require addition and multiplication to be properly defined on them then you can always use Groups and Rings.
Chimera exist [1], plus there are issues with transplant recipients and so on. I expect there are more edge cases I don't know about.
[1] https://www.scientificamerican.com/article/3-human-chimeras-....