Tables with no Primary Key

后端 未结 7 1679
一个人的身影
一个人的身影 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:55

    Just jumping in, because Matt's baited me a bit.

    You need to understand that although a clustered index is put on the primary key of a table by default, that the two concepts are separate and should be considered separately. A CIX indicates the way that the data is stored and referred to by NCIXs, whereas the PK provides a uniqueness for each row to satisfy the LOGICAL requirements of a table.

    A table without a CIX is just a Heap. A table without a PK is often considered "not a table". It's best to get an understanding of both the PK and CIX concepts separately so that you can make sensible decisions in database design.

    Rob

提交回复
热议问题