How does SQL Server maintain a composite primary key?

The limitation of my understanding of how the database stores the primary key is btree, based on a cluster key with each node storing the remaining columns.

I have not updated this understanding since university last century and would like to know how SQL Server stores a composite primary key compared to a single primary key.

Can someone help me point out some details about this?

+5
source share
1 answer

A composite key is exactly the same as a regular key, one column, a key, but is longer and consists of several values. Consider that you have a B-Tree in one column, say A. Pages without a sheet contain slots with column A values ​​and pointers to leaf pages. Sheet pages contain slots with column A values ​​(key), followed by all other columns of the row. The composite key is exactly the same, but the values ​​in the slots will be composite values ​​in the order in which they are declared in the key.

SQL Server . , 6 SQL 7.0 Kelan Delaney Technet: . , SQL 2008 R2 (, , , - ).

+4

All Articles