MySQL: Difference between revisions

65 bytes removed ,  05:17, 4 October 2015
imported>Rockdtben
(Created page with "MySQL is a language you use with databases. Queries are however not interpreted 'one line at a time', instead they are best described as a single instruction, with lots of arg...")
imported>LiamLime
Line 33: Line 33:
== Table Naming Convention ==
== Table Naming Convention ==


Tables are usually named in lower case, they use the underscore as a word separator and the first word is usually the name of the user that created the table or who owns the database. Most tables in the tgs database are called erro_X, because 'erro' was the user who made them. The last common thing is to always use singular. So 'user_reports' is not a good name, 'user_report' is. These naming conventions are there to help you down the road, so you will not be in doubt whether a table is called 'erro_players' or 'erro_player', etc. Examples: erro_player, erro_connection_log, erro_poll_question, etc.
Tables are usually named in lower case, they use the underscore as a word separator and the first word is usually the name of the project the table is a part of. Most tables in the tgs database are called ss13_X. The last common thing is to always use singular. So 'user_reports' is not a good name, 'user_report' is. These naming conventions are there to help you down the road, so you will not be in doubt whether a table is called 'ss13_players' or 'ss13_player', etc. Examples: ss13_player, ss13_connection_log, ss13_poll_question, etc.


== SELECT ==
== SELECT ==
Anonymous user