cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshni Rajagopal <>
Subject Data Model - Consistency question
Date Wed, 19 Sep 2012 12:16:33 GMT

Hi Folks,
In the relational world, if I needed to model students, courses relationship, I may have donea
students -master tablea course - master tablea bridge table students-course which gives me
the ids to students and the courses they are taking. This can answer both 'which students
take course A', as well as 'which courses are taken by student B'
In the cassandra world, I may design it like thisa static student column familya static course
column familya student-course column family with student id as key and dynamic list of course
- ids to answer 'which courses are taken by student B'a course-student column family with
course id as key and dynamic list of student ids  'which students take course A'
A screen which displays some student entity details as well as all the courses she is taking
will need to refer to 2 column families
Suppose an application inserts a new row in student column family, and a new row in student-course
column family, as transactions or consistency across column families is not guaranteed, there
is a chance that the client receives information that a student is attending a course from
student-course column family, but does not exist in the student column family. 
If we use Strong consistency from the  reads + writes combination - will this scenario not
occur ?And if we dont, can this scenario occur?  Regards,Roshni

View raw message