b-tree with duplicate keys
Posted on 2006-11-02
If multiple identical keys are put into a b-tree, how would it be possible to retrieve all of them? If for example, you have 5 keys per node, and you insert 15 keys into an empty tree, the root node would be split. Then during a retrieval, the retrieval function would find all duplicate keys in the root node, and then continue searching in the right node, but the keys in the left node would be lost.
So, how is this problem usually handled? Do you need to make some kind of separate nodes that store all duplicate keys?