incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
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  http://en.wikipedia.org/wiki/Nested_set_model

* 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
set. 

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

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

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 <eldad87@gmail.com> 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:
> http://www.readwriteweb.com/cloud/2011/02/video-simplegeo-cassandra.php
> 
> Thanks!
> 
> 
> 
> -- 
> It's always darkest just before you are eaten by a grue.


Mime
View raw message