3 ms·
I'll further focus on one point in the post: The author took it as a given that the code with short column names was "less readable". Why? Surely he wasn't repe
by mkelly 16y ago
I'll further focus on one point in the post: The author took it as a given that the code with short column names was "less readable". Why? Surely he wasn't repeating the literal field names again and again in the code?
In the last DB-intensive project I worked on, we used constants in the code that had to deal with column names. This was extremely useful when changing our database schema -- no names to hunt down and change, just change the name in the one place it was used in the code.
In this case, this method gives you both a readable name in your code and a short name to repeat in the DB.
Just a thought.
- barrydahlberg 16y agoThis Mongo console is pretty useful for poking around in your data during development. Usable field names help there.