Btree


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Btree
# 1  
Old 12-14-2012
Btree

Hi all
I understood the concept of Btree( Balanced tree). one thing i just want to know whether key and values are different or both are same.
If it is different, kindly please explain me the concept because i am on my way to implement it\

Thanks
# 2  
Old 12-14-2012
The ones I've written use a key with a pointer to an array of objects where the actual data lives.

So: No, keys and data are not the same. Besides which, the key could be concatenated values from different parts of the record, where the record is a struct, for example.

The object of a btree is to get fast access to the data, kind of like what databases do when they contruct btree indexes. Storing the data in the btree is not a good general solution, IMO.
# 3  
Old 12-14-2012
As with most things, how to build it depends what you want to do with it. btree structures meant to be stored on disk might look rather different from ones meant to operate purely in memory for example.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question