3 ms·
Surrogate keys do mirror reality though. As I once read in a Terry Pratchett book; if you replace the handle of an axe and then replace the head, is it still th
by aswerty 2y ago
Surrogate keys do mirror reality though. As I once read in a Terry Pratchett book; if you replace the handle of an axe and then replace the head, is it still the same axe?
For me, the answer is yes - since we imbue the axe with an identity outside of it's integral parts.
That is what a surrogate key is. An identity. Which is an abstract concept that exists in the real world.
And to pile on. The top comment is bad advice! Surrogate keys provide sanity - god save you if you have to work in a database solely using natural keys.
- vintermann 2y agoYes. Ultimately, "are these the same" and "are these different" are philosophical questions. Or to be more precise, teleological questions. Because those questions have no meaning except with an "for our purposes here" added. And it's up to us to decide what we care about, if anything. If we care about what other people want with the data though, or suspect that our own wants might not be set in stone, then we should also care to model identity independently in the system (that is, use surrogate keys).
- fuzztester 2y ago>As I once read in a Terry Pratchett book; if you replace the handle of an axe and then replace the head, is it still the same axe? Yes and no. It is the Axe of Theseus ;) https://en.m.wikipedia.org/wiki/Ship_of_Theseus https://en.m.wikipedia.org/wiki/Ship_of_Theseus
- aswerty 2y agoThanks - I think somewhere in the back of my mind I was also aware of the Ship. But Pratchett is too good. The quote: > This, milord, is my family's axe. We have owned it for almost nine hundred years, see. Of course, sometimes it needed a new blade. And sometimes it has required a new handle, new designs on the metalwork, a little refreshing of the ornamentation . . . but is this not the... axe of my family?
- mgkimsal 2y agoOr Trigger's Broom: https://www.youtube.com/watch?v=BUl6PooveJE https://www.youtube.com/watch?v=BUl6PooveJE
- akira2501 2y ago> since we imbue the axe with an identity outside of it's integral parts. Typically for the purposes of ownership. So it's really part of a a hierarchical identity scheme.