Database Design Primay Key, ID vs String

前端 未结 5 1501
执笔经年
执笔经年 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:47

    You are doing the right thing - identity field should be numeric and not string based, both for space saving and for performance reasons (matching keys on strings is slower than matching on integers).

提交回复
热议问题