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: Build an index to join two CFs
Date Fri, 10 Sep 2010 23:42:27 GMT
I cannot tell you where in the code to make these changes. But it sounds like you want to fork
cassandra and turn it into a RDBMS. It would undoubtedly be easier to just use a RDBMS.

Rather than have two CF's, address and name, just have one for the person using a super CF.
Pull back the entire row for the id. Denormalise your data so the query is answered by one
slice request to one CF, then you do not need  joins. 

If you want some advice on the data model, move the discussion to the user list. 

Aaron



On 11 Sep 2010, at 09:01, Alvin UW wrote:

> Hello,
> 
> I am going to build an index to join two CFs.
> First, we see this index as a CF/SCF. The difference is I don't materialise
> it.
> Assume we have two tables:
> ID_Address(*Id*, address) ,  Name_ID(*name*, id)
> Then,the index is: Name_Address(*name*, address)
> 
> When the application tries to query on Name_Address, the value of "name" is
> given by the application.
> I want to direct the read operation  to Name_ID to get "Id" value, then go
> to ID_Address to
> get the "address" value by the "Id" value. So far, I consider only the read
> operation.
> By this way, the join query is transparent to the user.
> 
> So I think I should find out which methods or classes are in charge of the
> read operation in the above operation.
> For example, the operation in cassandra CLI "get
> Keyspace1.Standard2['jsmith']" calls exactly which methods
> in the server side?
> 
> I noted CassandraServer is used to listen to clients, and there are some
> methods such as get(), get_slice().
> Is it the right place I can modify to implement my idea?
> 
> Thanks.
> 
> Alvin


Mime
View raw message