12-14-2012
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
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.