Are there any naming conventions for tables/fields within MySQL? I have found a big list of “reserved words” but other than that are there any other concerns about naming?
For example, are field/table names like this acceptable:
p_name
p.name
p-name
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can not use
p.nameorp-nameas fields!p.namewould mean fieldnamefrom tablep.p-namemeans subtract fieldnamefrom fieldp.Prefixes in a database can be useful if there are third party tables in the same database. For example, mantis prefixes (by default) all table names with
mantis_to prevent name collisions. I would not recommend this for fields, but that’s a matter of taste, right?