Naming primary keys

Use id as internal Primary Key identifier

In the beginning it might be tempting to use the format id_${name_of_table} for a primary key. For the table user, the primary key would be id_user.

Don't do this:

  1. This naming format is superfluous. Your primary key does already belongs to a table. There is no need to specify the table again.
  2. Almost all frameworks (if you want to use an ORM) are expecting your primary key to be named as id.

Use lower case writing for the id column

You might think that the id column is special and should be written in upper-case. Don't do it. Use the lower-case format id.