Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please take literally one course.

Do NOT use mnemonics as primary keys. It WILL bite you.

 help



https://en.wikipedia.org/wiki/Natural_key you should have learned learn this in your courses.

Clam down, I am not suggesting using this for actual domain entity keys, these are used in place of enums and have their advantages. I have doing this a long time and it has not bit me, I have also seen many other system designed this way as well working just fine.

Using an incrementing surrogate key for say postal state code serves no purpose other than making things harder to use and debug. Most systems have many code values such as this and using surrogate key would lead to a bunch of overlapping hard to distinguish int data that leads to all sorts of issues.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: