Re: Modeling contact list, plain table or List

2016-01-12 Thread DuyHai Doan
DuyHai Doan <doanduy...@gmail.com> <doanduy...@gmail.com> > Reply: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > Date: January 12, 2016 at 10:27:45 AM > To: user@cassandra.apache.org <user@cassandra.apache.org>> > &

Re: Modeling contact list, plain table or List

2016-01-12 Thread DuyHai Doan
c contact row and still able >> to comply with the select requirements? >> >> Thanks >> -- >> IPVP >> >> >> From: Jack Krupansky <jack.krupan...@gmail.com> >> <jack.krupan...@gmail.com> >> Reply: user@cassandra.apache.org <us

Re: Modeling contact list, plain table or List

2016-01-12 Thread I PVP
l.com>><mailto:jack.krupan...@gmail.com> Subject: Re: Modeling contact list, plain table or List 1)SELECT all rows from user_contact excluding the one that the user wants to get rid of. 2) DELETE all the user_contact rows for that particular user . 3) INSERT the result of 1).

Re: Modeling contact list, plain table or List

2016-01-11 Thread Carlos Alonso
hael <michael.la...@nytimes.com> >> <michael.la...@nytimes.com> >> Reply: user@cassandra.apache.org <user@cassandra.apache.org>> >> <user@cassandra.apache.org> >> Date: January 9, 2016 at 11:51:27 AM >> To: user@cassandra.apach

Re: Modeling contact list, plain table or List

2016-01-11 Thread Jack Krupansky
..@gmail.com> <jack.krupan...@gmail.com> > Reply: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > Date: January 11, 2016 at 7:00:04 PM > > To: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org

Re: Modeling contact list, plain table or List

2016-01-11 Thread Jonathan Haddad
rom: Jack Krupansky <jack.krupan...@gmail.com> <jack.krupan...@gmail.com> > Reply: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > Date: January 11, 2016 at 7:00:04 PM > > To: user@cassandra.apache.org <user@cassandra.apache.or

Re: Modeling contact list, plain table or List

2016-01-11 Thread I PVP
016 at 11:14:10 AM To: user@cassandra.apache.org <user@cassandra.apache.org>><mailto:user@cassandra.apache.org> Subject: Re: Modeling contact list, plain table or List In the current iteration of materialized view, it is still not possible to have WHERE clause other than IS NOT NULL

Re: Modeling contact list, plain table or List

2016-01-11 Thread Jack Krupansky
il.com> > Reply: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > Date: January 11, 2016 at 11:14:10 AM > > To: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > S

Re: Modeling contact list, plain table or List

2016-01-11 Thread DuyHai Doan
s_favorite boolean, >>>> contact_id uuid, >>>> created_at timeuuid, >>>> favorite_at timestamp, >>>> PRIMARY KEY ((user_id, contact_name), is_favorite) >>>> ) WITH CLUSTERING ORDER BY (contact_name ASC); >>>> >>>> Query: Select *

Re: Modeling contact list, plain table or List

2016-01-11 Thread Jack Krupansky
user_id, contact_name), is_favorite) >>> ) WITH CLUSTERING ORDER BY (contact_name ASC); >>> >>> Query: Select * from user_contact_list where user_id = :userid and >>> is_favorite = true order by contact_name asc; >>> >>> Looks like each contact as a row/cl

Re: Modeling contact list, plain table or List

2016-01-10 Thread DuyHai Doan
.la...@nytimes.com> > <michael.la...@nytimes.com> > Reply: user@cassandra.apache.org <user@cassandra.apache.org>> > <user@cassandra.apache.org> > Date: January 9, 2016 at 11:51:27 AM > To: user@cassandra.apache.org <user@cassandra.apache.org>> > <

Re: Modeling contact list, plain table or List

2016-01-09 Thread Laing, Michael
Note that in C* 3.02 the second query is invalid: cqlsh> Select * from communication.user_contact_list where user_id = 98f50f00-b6d5-11e5-afec-6003089bf572 and is_favorite = true order by contact_name asc; *InvalidRequest: code=2200 [Invalid query] message="PRIMARY KEY column "is_favorite"

Re: Modeling contact list, plain table or List

2016-01-09 Thread Isaac P .
andra.apache.org>><mailto:user@cassandra.apache.org> Subject: Re: Modeling contact list, plain table or List Note that in C* 3.02 the second query is invalid: cqlsh> Select * from communication.user_contact_list where user_id = 98f50f00-b6d5-11e5-afec-6003089bf572 and is_favorite = true orde

Modeling contact list, plain table or List

2016-01-08 Thread Isaac P .
Hi everyone What would perform better while modeling a simple user contact list that will be used mainly to select the recipients for/from/to messages ? a) Individual rows to each (user, contact) pair so a select would fetch all the rows to retrieve all the contacts from a given user. or

Re: Modeling contact list, plain table or List

2016-01-08 Thread Jack Krupansky
How big is each contact list expected to be? Dozens? Hundreds? Thousands? If just dozens, a simple list column would seem sufficient. If thousands, the row (not partition) would get kind of bloated. What requirements do you have for updating? If updating contacts and lots of contacts, I think I'd