1

Database Index can be constructed using binary search trees (BST) or HashTables ,

From my understanding so far , HashTables are superior to BST in terms of time taken for searching and insertions however BST beats HashTables hand down in terms of space efficiency

Under what situation would it be good to use hashtables instead of BST , vice-verse to construct the Database Index , any there any other points i missed out ???.

  • It seems to me that if the index is going to be very very large, then a BST might be a better idea, if space-efficiency is going to be a concern. How large? That will vary, I'm sure. ;) – FrustratedWithFormsDesigner Feb 19 '14 at 19:57
1

Use BST where returning ordered records by the indexed column(s) is a typical use case.

Use HT otherwise.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.