当我们不需要我们的表的主键? [英] When we don't need a primary key for our table?

查看:115
本文介绍了当我们不需要我们的表的主键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否会发生我们设计一个不需要主键的表格?

Will it ever happen that we design a table that doesn't need a primary key?

推荐答案

h1>

主键在幕后做了很多事情,即使你的应用程序从不使用它。

No.

The primary key does a lot of stuff behind-the-scenes, even if your application never uses it.

例如:集群可提高效率(因为堆表是一个混乱)。

For example: clustering improves efficiency (because heap tables are a mess).

更何况,如果ANYONE你必须在你的表上做一些需要拉一个特定的行,你没有主键,你是坏家伙。

Not to mention, if ANYONE ever has to do something on your table that requires pulling a specific row and you don't have a primary key, you are the bad guy.

这篇关于当我们不需要我们的表的主键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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