I was asked this question on the interview a few minutes ago and I didnt know the answer. I answered it logically thinking that a B-Tree is always a depth structure because it has multiple levels. Was I right on my answer? What would be the best way to answer this question?
The B-Tree structure provides the SQL Server Engine with a fast way to move through the table rows based on index key, that decides to navigate let or right, to retrieve the requested values directly, without scanning all the underlying table rows.
As you can see from the previous image, the data pages for the SQL Server table can be organized within each partition in two ways: in Heap or B-Tree Clustered tables.
1 Basic structure of an index. An index consists of a key and key values. A key is the column name of an indexed column. The values in the column are called the key values. Creating an index for a column that will be used as the basis for retrievals from the table will improve the table's retrieval performance.
B-tree hence the name will be a tree or depth structure.
Yes, you were right in both your answer and your reasoning. A tree is never a flat structure. An example of a flat structure would be a single dimension array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With