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

后端 未结 14 2014
-上瘾入骨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:23

    Don't do that. It's redundant and leads to frustration in the long run.

    The only field, where you could apply this might be id, because user_id would obviously be the id of the user and it would simplify writing joins in SQL. But I wouldn't even do that.

提交回复
热议问题