cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Kalra <sandeep.ka...@gmail.com>
Subject Re: List of List
Date Tue, 01 Mar 2016 17:39:38 GMT
​I do not have limit of number of Answers or its comments.​ Assume it to be
clone of StackOverflow..



Best Regards,
Sandeep Kalra


On Tue, Mar 1, 2016 at 11:29 AM, Jack Krupansky <jack.krupansky@gmail.com>
wrote:

> Clustering columns are your friends.
>
> But the first question is how you need to query the data. Queries drive
> data models in Cassandra.
>
> What is the cardinality of this data - how many answers per question and
> how many comments per answer?
>
>
> -- Jack Krupansky
>
> On Tue, Mar 1, 2016 at 12:23 PM, Sandeep Kalra <sandeep.kalra@gmail.com>
> wrote:
>
>> Hi all.
>>
>> I am beginner in Cassandra.
>>
>> I am working on Q&A project where I have to maintain a list of list for
>> objects.
>>
>> For e.g. A Question can have list of Answers, and each Answer can then
>> have list of Comments.
>>
>> --
>> As of now I have 3 tables. Questions, Answers, and Comments. I have
>> stored UID of Answers in List<uid of answers> for question, and then each
>> answer has List<UID of comments> in separate table. [Optionally a Comment
>> may have replies]
>>
>> I do multiple queries to find the complete answers-list and then its
>> related comments.
>>
>> This whole thing looks inefficient to me.
>> --
>>
>> Question:
>> *Is there a better way to do it in Cassandra*. What can I do as far as
>> re-designing database to have lesser queries.
>>
>>
>>
>> Best Regards,
>> Sandeep Kalra
>>
>>
>

Mime
View raw message