IDENTITY vs. SEQUENCE(它不是喊叫,它是SQL) [英] IDENTITY vs. SEQUENCE (it is not shouting, it is SQL)

查看:62
本文介绍了IDENTITY vs. SEQUENCE(它不是喊叫,它是SQL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用序列而不是身份是否有任何不利之处?这对于一个包含大约100个表的数据库,意味着或多或少我喜欢有100个_个体序列_(当然我知道有序列我必须自己实现更多的东西)。

为什么我更喜欢序列:我需要同步数据库。意味着我需要覆盖身份。我在MSDN上读到这对一张桌子来说是可能的,但我担心这会成为一个瓶颈。

有什么建议吗?



提前谢谢。

Is there any disadvantage using sequence instead of identity? This for a database with about 100 tables, means more or less I like to have 100 _individual sequences_ (and of course I’m aware with sequences I have to implement something more by myself).
Why "I prefer" sequences: I need to synchronize databases. Means I need to "overwrite" identity. I read in MSDN that this is possible for a table at a time, but I’m afraid this becomes a bottleneck.
Any suggestions?

Thank you in advance.

推荐答案

我想你可以在这里找到答案: SEQUENCE与SQL Server中的IDENTITY [ ^ ](我不能写得更好)。这里提供了许多有用的信息:序列与身份 [ ^ ]



但是,还不够有关数据库同步的信息不允许我提供更多详细信息......
I think, you can find your answer here: SEQUENCE Vs IDENTITY in SQL Server [^] (i can't write it better). Many useful information are availible here: Sequence vs identity[^]

However, not enough information about database synchronization does not allow me to provide more details...


这篇关于IDENTITY vs. SEQUENCE(它不是喊叫,它是SQL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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