The Daily WTF
A long time ago, when I was first learning about databases, one of the points brought up was the difference between a “natural key” and a “surrogate key”. A natural key was a unique identifier which already existed in your dataset, and surrogate keys were those you made up- UUIDs or sequences or what have you.
As a best practice, even if you have a viable natural key, you should still use a surrogate key. There are exceptions, but it’s usually preferable to employ a database key which you control to provide identity, especially one which has no meaning- because that means it’ll never need to change values.
Adam H‘s co-worker never got this memo.
They needed to store data about vehicles. The particular data being stored, in this case, was also time series data. So they decided that their key would be a mashup of the timestamp and the
To read the full article click on the 'post' link at the top.