On 2013/11/08 05:47, James K. Lowden wrote:
Not that you asked, but I also suggest you consider dropping the "Tbl" from the table names. Noting that at table is a table in its name is like calling every file "data". It makes it harder to read and conveys no information. I myself prefer plurals for table names (files, tracks, albums) because each *row* represents the singular -- a file, a track, an album -- and tables as we know are made of rows. But some people find that pedantic, and they're not wrong. --jkl

Firstly, any convention that makes things easier to understand and keep track of complex systems is a worthwhile pursuit and hardly pedantic, and very much agreed on the plural use.

Allow me to add to the naming perspective though - while I agree that redundant name-padding is a hindrance rather than a boon to simplicity and understanding, it is always (on the programming side at least) wise to prefix variable names with a function descriptors. "tbl_users" or "tbl_contacts", as opposed to just users / contacts, is clearly marked as to where they belong in the large hierarchy of objects needed to keep track of, and can be distinguished by one glance from an Index or a Trigger or such.

Further to this, when documenting your work or simply listing and sorting different objects it is very helpful to have the readily-available methods of sorting lists have the added benefit of keeping similar objects together in a group - and / or - have simple Like / glob / match (or whatever likeness function exists in your system) be able to distinguish one sort of object from the other. How much this helps from a pure Database-design point of view is rather debatable, but it should be the very least of a hindrance.

Of course, all of the points above goes down the rabbit hole when I see people dutifully prefix variables and then get lazy on the descriptors as to end up with things like "tbl_1", "tbl_2", "trig_t1", "tbl_myTable" or "tbl_records". Words cannot describe....




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to