This is the list of conventions to create databases, tables, fields, and other things related to database development.
- use english language for name of fields and tables.
- Table names are lowercase, plural, and underscored without abbreviation except for commonly used. example:
- Field names are lowercase, and without abbreviation except for commonly used like
- Field names with two or more words are underscored. Example:
idas name of primary key for all tables with int data type for auto increment or char(32) for UUID/GUID.
- use the (singular) name of the related table followed by
_idfor foreign keys. Example:
user_idthat reference to
- Upper casing SQL keywords and built-in functions. Example:
SELECT first_name ,last_name ,CONCAT(first_name, last_name) AS full_name FROM users;
- Avoid asterisk (*) symbol on select clause.