什么是主键列的最佳数据类型以及原因 [英] what is the best data type for primary key columns and why

查看:75
本文介绍了什么是主键列的最佳数据类型以及原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

表格中主键的最佳做法是什么?

What's the best practice for primary keys in tables?


  1. 自动递增的标识整数列。
  2. 唯一标识符(GUID)



推荐答案

几乎所有的时间你应该去 
Almost all of the time you should go with 


  1. 自动递增的标识整数列

Klaus Aschenbrenner在youtube上发表了一个演示文稿,介绍了当你插入一个主键时,使用GUID作为主键的优势,1,000,同时记录,如一个非常繁忙的网站。

Klaus Aschenbrenner gave a presentation, I saw on youtube, about the advantage of using a GUID for a primary key when you are inserting a lot, 1,000's, of records at the same time, like a very busy web site.

https://www.youtube.com/watch?v=EtIo_eiaDcE

https://www.youtube.com/watch?v=EtIo_eiaDcE


这篇关于什么是主键列的最佳数据类型以及原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆