[Newbies] Re: Best data structure for a multi-dimensional database?

stephan at stack.nl stephan at stack.nl
Wed Oct 8 08:28:45 UTC 2008


> Two data structures spring to mind:

It depends. How many dimensions do you want to
support with how many elements, how many facts,
and what kind of calculations do you want to do
on those facts? Can you, and do you want to
pre-calculate values? Do you need a data structure
that can be easily distributed over multiple
machines?

You could try a btree of the facts with a multi-
dimensional index (pairs of low-high values for
each dimension). When you have to split a block,
you can select a dimension where the number of facts
splits reasonably. Build the dimension hierarchy
separately.

Stephan


More information about the Beginners mailing list