In database, are clustered index implemented with a b-tree and non-clustered with b+tree?

I read somewhere that clustered index are internally implemented with a b-tree data structure. There can only be one clustered index per table because the table is part of the clustered index structure. As a result it also dictates the order of rows of a table throught the indexed column.

On the other hand, a non-clustered index does not dictate the physical order of rows in a table because the table is not part of the non-clustered index. Non-clustered index uses internal nodes as keys and references the actual table.

If you read the definition of b+tree data structure and it sounds a lot like a non clustered index where the leave nodes are the actual data and internal nodes are keys to traverse and find the actual data. But did not come across a source to confirm this that clustered index implemented with a b-tree and non-clustered with b+tree.

ChatGPT seems to agree that clustered index are implemented with b-tree and non-clustered index with b+tree. Is this always the case?

submitted by /u/aiai92
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/B97tQVg

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close