4 ms·
Surrogate Keys V/s Natural Keys in RDBMS
I've been frustrated by Laravel Eloquent's choice of not supporting Composite Keys. I believe Surrogate Keys in most cases should be ignored because it is unnecessary data allocation. For instance, in many-to-many relational tables, it becomes unnecessary to have a surrogate key and then the pair. Rather, just use non-clustered indices like MySQL's UNIQUE key or PRIMARY if need be.
What does HN think about this?
- sgeneris 10y agohttp://tinyurl.com/hl84fes http://tinyurl.com/hl84fes http://tinyurl.com/gktal74 http://tinyurl.com/gktal74 http://tinyurl.com/h26fpwa http://tinyurl.com/h26fpwa http://tinyurl.com/zjyd4aa http://tinyurl.com/zjyd4aa http://tinyurl.com/jmajceb http://tinyurl.com/jmajceb
- activatedgeek 10y agoWow, you could have simply given a gist or your opinion on the matter rather than posting a plethora of links.
- sgeneris 10y agohttp://www.dbdebunk.com/2016/08/understanding-keys-entity-defining.html http://www.dbdebunk.com/2016/08/understanding-keys-entity-de... http://www.dbdebunk.com/2016/06/on-kinds-of-keys-natural-primary-and.html http://www.dbdebunk.com/2016/06/on-kinds-of-keys-natural-pri... THE KEY TO KEYS: A MATTER OF IDENTITY http://www.dbdebunk.com/2014/01/new-paper-4-published.html http://www.dbdebunk.com/2014/01/new-paper-4-published.html http://www.dbdebunk.com/2015/08/surrogate-key-illusions.html http://www.dbdebunk.com/2015/08/surrogate-key-illusions.html http://www.dbdebunk.com/2012/07/are-primary-keys-necessary.html http://www.dbdebunk.com/2012/07/are-primary-keys-necessary.h...