I have data consists of keys mapped to values, like this:
---------------------
Key | Value
---------------------
(0, 0, 0, 0) | a
(0, 0, 0, 1) | b
(0,
if there exist a maximum(M) value for each part of the keys, you can create a single keyed tree by interpreting the keys as numbers written in base M (or in mixed base)
(x,*,*,*) will be a query for (x*M^3,(x+1)*M^3-1)for strings:
|:('ax','bc','a','x') -> 'ax|bc|a|x'
the separator should not appear in the input strings(it may appear, but in that case it may interfere with accessing the asked results)
but...if your situation is difficult you can use objects as keys, in java i would create a class for the key, and define a compare oparator between them
for examples i would quote: How to compare objects by multiple fields