Sql naming best practice

前端 未结 12 2732
春和景丽
春和景丽 2021-02-14 09:48

I\'m not entirely sure if there\'s a standard in the industry or otherwise, so I\'m asking here.

I\'m naming a Users table, and I\'m not entire

12条回答
  •  离开以前
    2021-02-14 10:09

    Look at it as an entity and name the fields accordingly

    I'd suggest a User table, with fields such as id, name, age, etc.

    A group of records is a bunch of users, but the group of fields represents a user.

    Thus, you end up referring to user.id, user.name, user.age (though you won't always include the table name, depending on the query).

提交回复
热议问题