Should each and every table have a primary key?

后端 未结 15 1109
甜味超标
甜味超标 2020-11-22 07:00

I\'m creating a database table and I don\'t have a logical primary key assigned to it. So, I\'m thinking about leaving it without a primary key, but I\'m feeling a bit guilt

15条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 07:25

    In short, no. However, you need to keep in mind that certain client access CRUD operations require it. For future proofing, I tend to always utilize primary keys.

提交回复
热议问题