incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <>
Subject Re: b-tree
Date Wed, 20 Jul 2011 22:44:27 GMT
Just throwing out a (half baked) idea, perhaps the Nested Set Model of trees would work

* Ever row would represent a set with a left and right encoded into the key
* Members are inserted as columns into *every* set / row they are a member. So we are de-normalising
and trading space for time. 
* May need to maintain a custom secondary index of the materialised sets. e.g. slice a row
to get the first column >= the left value you are interested in, that is the key for the

I've not thought it through much further than that, a lot would depend on your data. The top
sets may get very big, . 


Aaron Morton
Freelance Cassandra Developer

On 21 Jul 2011, at 08:33, Jeffrey Kesselman wrote:

> Im not sure if I have an answer for you, anyway, but I'm curious....
> A b-tree and a binary tree are not the same thing.  A binary tree is a basic fundamental
data structure,  A b-tree is an approach to storing and indexing data on disc for a database.
> Which do you mean?
> On Wed, Jul 20, 2011 at 4:30 PM, Eldad Yamin <> wrote:
> Hello,
> Is there any good way of storing a binary-tree in Cassandra?
> I wonder if someone already implement something like that and how accomplished that without
transaction supports (while the tree keep evolving)?
> I'm asking that becouse I want to save geospatial-data, and SimpleGeo did it using b-tree:
> Thanks!
> -- 
> It's always darkest just before you are eaten by a grue.

View raw message