Tables with no Primary Key

后端 未结 7 1677
一个人的身影
一个人的身影 2020-12-13 00:17

I have several tables whose only unique data is a uniqueidentifier (a Guid) column. Because guids are non-sequential (and they\'re client-side generated so I can\'t use news

7条回答
  •  悲&欢浪女
    2020-12-13 00:42

    Since you are doing replication, your are correct identities are something to stear clear of. I would make your GUID a primary key but nonclustered since you can't use newsequentialid. That stikes me as your best course. If you don't make it a PK but put a unique index on it, sooner or later that may cause people who maintain the system to not understand the FK relationships properly introducing bugs.

提交回复
热议问题