cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mehar Chaitanya <meharchaita...@gmail.com>
Subject Re: Is this possible with cassandra
Date Sat, 30 Jan 2010 14:27:11 GMT
Hi Jonathan

I have gone through Lucandra , but i am a bit ambiguous for retrieving based
on multiple conditions.

In the previous example,


keyspace.category[WORLDNEWS][SECTION] = HOCKEY
keyspace.category[WORLDNEWS][ARTICLE] = World cup hockey matches begin...
keyspace.category[WORLDNEWS][IS_PUBLISHED] = TRUE

keyspace.category[WORLDNEWS][SECTION] = TENNIS
keyspace.category[WORLDNEWS][ARTICLE] = Australian Open...
keyspace.category[WORLDNEWS][IS_PUBLISHED] = TRUE


keyspace.category[WORLDNEWS][SECTION] = CRICKET
keyspace.category[WORLDNEWS][ARTICLE] = IPL 2010
keyspace.category[WORLDNEWS][IS_PUBLISHED] = FALSE


and another set as
keyspace.section[HOCKEY][CATEGORY] = WORLDNEWS
keyspace.section[HOCKEY][ARTICLE] = World cup hockey matches begin...
keyspace.section[HOCKEY][IS_PUBLISHED] = TRUE


keyspace.section[TENNIS][CATEGORY] = WORLDNEWS
keyspace.section[TENNIS][ARTICLE] = Australian Open...
keyspace.section[TENNIS][IS_PUBLISHED] = TRUE

keyspace.section[CRICKET][CATEGORY] = WORLDNEWS
keyspace.section[CRICKET][ARTICLE] = IPL 2010
keyspace.section[CRICKET][IS_PUBLISHED] = FALSE

I have two questions to ask
*
FIRST ONE*

If i want to retrieve the result as alll values which have IS_PUBLISHED is
TRUE and SECTION =CRICKET

In the above case i have to get two column families join ? Am i correct or

I have to get the two queries which have IS_PUBLISHED =TRUE in one query
and  SECTION =CRICKET in another after getting the result again define
another set and retrive that.


*SECOND ONE*

After some days passed and database was changed like IPL2010 is also
published its value is true

I read that we have only INSERTS no UPDATE or DELETE in some blog
http://www.vineetgupta.com/

so then what to do with old one ?

Correct me if i am going in a wrong

Sorry for my english .


On Fri, Jan 29, 2010 at 11:36 PM, Jonathan Ellis <jbellis@gmail.com> wrote:

> On Fri, Jan 29, 2010 at 9:09 AM, Mehar Chaitanya
> <meharchaitanya@gmail.com> wrote:
> >   1. This would lead to enourmous amount of duplication of data, in short
> >   if I now want to view the data from IS_PUBLISHED dimenstion then my
> database
> >   size would scale up tremendously.
>
> Yes.  But disk space is so cheap it's worth using a lot of it to make
> other things fast.
>
> >   2. Above way of reprensting the data would suffice if I want to
> retrieve
> >   something like, get me all the articles whose category is WORLDNEWS.
> But
> >   what if I want to find out something like: Get me all the articles
> whose
> >   Section is BASEBALL and Category is WORLDNEWS. For addressing queries
> taht
> >   depend on multiple parameter how do we do it? Hope I am clear with my
> >   problem statement :(
>
> You have to do the intersection client-side (or use something like
> http://github.com/tjake/Lucandra to do it for you).
>
> -Jonathan
>



-- 
The difference between possible and impossible lies in person's
determination.

Thanks&Regards,
Mehar Chaitanya Bandaru,
Software Engineer,
S cubes IT Solutions India Pvt. Ltd.,
http://www.scubian.com
(W) +91 4040307821,
(Cell) +91 9440 999 262,
#4-1-319, 2nd Floor, Abids Road, Hyderabad - 01.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message