Let me try and give an example. Let's assume we are modelling a non-leaf node which contains long keys and long offsets. We can do it in any of the following ways:
|offset0|key1|offset1|key2|offset2|key3|offset3......|
OR |key1|key2|key3...|offset0|offset1|offset2|offset3...|
OR |offset0|offset1|offset2|offset3...|key1|key2|key3...|
OR |count|key3|key1|key7...|offset0|offset1|offset2.....| <== Binary search-able keys
In all of these cases, the data structure is different but the basic B-Tree algorithm remains the same. You can implement the algorithm once (using templates (C++), macros (C), or a weakly typed language (Lisp/Scheme)) and re-use it with any and all data structures that come up later.EDIT: Forgot offset0