Or they should be lowercase letters? Is there any standard for it?
Asked
Active
Viewed 4,576 times
2
-
1Personally we prefer lowercase, separated by underscores. So, for instance we'd have a table called my_table_name. The cool thing about this is that our ORM managers translates this in code to myTableName when it creates a PHP class for it, but that's just a preference. There's not really a standard with it. I guess a "standard" would be "whatever your other tables are using as their naming convention". – Sarel Aug 14 '12 at 12:12
-
1See also http://stackoverflow.com/questions/7662/database-table-and-column-naming-conventions as well as this http://www.granite.ab.ca/access/tablefieldnaming.htm and finally this one http://www.gplivna.eu/papers/naming_conventions.htm – Richard Chambers Aug 14 '12 at 12:14
-
I don't know if there are MySQL-specific conventions, but I personally like to stick to the Clean Code approach that names should be devoid of "encodings" and should carry meaning and context. If someone looks at a name in a domain and thinks "Oh, they must be using MySQL" then that sounds like a leaked abstraction. – David Aug 14 '12 at 12:14
2 Answers
3
i always use lowercase for mysql table and field names. You can use (_) underscores in tablenames and fields to make it more clear.

Jurgo
- 907
- 4
- 18
0
I have tried both upper and lower cases both twogether and individually. Till now I did't get any issues. For more than one word I use underscores to separate them. Also you can use like this for example sampleTable.

Sathish Kumar k k
- 1,732
- 5
- 26
- 45