Database Design Primay Key, ID vs String

前端 未结 5 1502
执笔经年
执笔经年 2021-02-01 16:11

I am currently planning to develop a music streaming application. And i am wondering what would be better as a primary key in my tables on the server. An ID int or a Unique Stri

5条回答
  •  悲&欢浪女
    2021-02-01 16:50

    My recommendation is: use ids.

    You'll be able to rename that "Genre" with 20000 songs without breaking anything.

    The idea behind this is that the id identifies the row in the table. Whatever the row has is something that doesn't matters in this problem.

提交回复
热议问题