Is prefixing each field name in a table with abbreviated table name a good practice?

后端 未结 14 2005
-上瘾入骨i
-上瘾入骨i 2020-12-16 19:26

Do you prefix each field in a table with abbreviated table name?

Example:

Table: User

Fields:
user_id
user_name
user_password

Or d

14条回答
  •  温柔的废话
    2020-12-16 20:22

    If you are using a UNIQUE PREFIX for each table, then

    • No need to use an alias for joins (except self join)
    • All the columns in the database should be unique in name
    • You can easily identity the table from column name itself(from a output or select query)

提交回复
热议问题