brainless
brainless

Reputation: 5819

which data structure is used in most popular databases?

i want to know which data structure(AVL, B-Tree, etc...) is used in most popular relational databases. and also in what way the data structure is superior than other in-class data structures? if possible a small comparison could help me a lot! thanks in advance!

Upvotes: 14

Views: 14309

Answers (3)

Abidemi
Abidemi

Reputation: 31

I would choose the B+ Selection Tree because it is appropriate for efficient insertion, deletion and range queries but if the database has not been changed since it was created, then a SIMPLE LINEAR INDEX is required

Upvotes: 3

Joey Adams
Joey Adams

Reputation: 43370

It's usually B-tree or variants thereof, primarily because it packs nodes into blocks, unlike binary trees such as AVL.

A node of a B-tree has a fixed maximum size and holds multiple keys and multiple pointers to child nodes, meaning fewer blocks need to be retrieved from disk to look up a value (compared to a binary tree).

The Wikipedia article on B+ trees has a good introduction from the angle of its application to databases.

Upvotes: 13

Steve Townsend
Steve Townsend

Reputation: 54128

For SQL Server, there is background info here.

Upvotes: 5

Related Questions