D
D
des1roer2016-01-12 17:24:37
SQL
des1roer, 2016-01-12 17:24:37

What is the correct id or id_table?

question in the title.
where are the naming conventions?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Kovalsky, 2016-01-12
@dmitryKovalskiy

There are no naming rules. There are agreements within the team and the project. The simplest principle is the identifier inside the table - id, foreign keys - tableNameId or id_tableName.

D
des1roer, 2016-01-12
@des1roer

off the bat. Google found out that id is an antipattern
stackoverflow.com/questions/208580/naming-of-id-co...
www.amazon.com/s/ref=nb_sb_ss_i_1_5?url=search-ali...

A
Anton Shcherbakov, 2016-01-12
@WestTrade

In fact, nowhere. Use names that are easy to understand.
For example, when working with many tables: category, user, product, the names will be more convenient for understanding: cid, uid, pid, respectively.
In short, the master-master.

M
Maxim, 2016-01-23
@mgramin

rsdn.ru/article/db/sqlnames.xml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question