Cassandra Community Webinar | The Data Model is Dead, Long Live the Data Model
Why Stack Overflow recommends it
Stack Overflow users link it when answering Cassandra questions from people who are still thinking in joins and foreign keys and need an introduction to query-driven, denormalized modeling.
Recommended by 4 people across 4 different months, 2013 to 2013.
What it is
A one-hour 2013 webinar from PlanetCassandra in which Patrick McFadin of DataStax explains how data modeling still matters in Cassandra. It starts from familiar relational ideas (static schema, one-to-one, many-to-many), then covers how Cassandra differs, tricks for fast and resilient applications, and a section on transactions.
What people said
Recommends Lyuben Todorov · 2013-06 · Stack Overflow · on “How to do a join queries with 2 or more tables in cassandra cql”
Cassandra = No Joins. Your model is 100% relational. You need to rethink it for Cassandra. I would advice you take a look at these slides [LINK] . They dig deep into how to model data for cassandra. Also here is a webinar [this video] covering the topic. But stop thinking foreign keys and joining tables, because if you need relations cassandra isn't the tool for the job. But Why? Because then you need to check consistency and do many other things that relational databases do and so you loose the performance and scalability that cassandra offers. What can I do? DENORMALIZE! Lots of data in one table? But the table will have too many columns! So? Cassandra can handle a very large number of columns
Recommends Allan Elder · 2013-08 · Stack Overflow · on “Index multiple attributes within one key space in Cassandra”
You're thinking of this in a relational fashion, but Cassandra encourages us to write multiple copies of the data and doesn't support grouping / aggregation or joins. You may find this useful; "The data model is dead, long live the data model". [this video]
Recommends jbellis · 2013-10 · Stack Overflow · on “Super column families in cassandra”
Supercolumns have been deprecated for years. Some modern data modeling resources include DataStax's introduction to data modeling in Cassandra [LINK] and Patrick McFadin's three-part series: The Data Model is Dead; Long live the Data Model [this video] Become a Super Modeler [LINK] The World's Next Top Data Model [LINK]
Recommends RussS · 2013-12 · Stack Overflow · on “Cassandra has a limit of 2 billion cells per partition, but what's a partition?”
With the advent of CQL3 the terminology has changed slightly from the old thrift terms. Basically Create Table foo (a int , b int, c int, d int, PRIMARY KEY ((a,b),c)) Will make a CQL3 table. The information in a and b is used to make the partition key, this describes which node the information will reside on. This is the 'partiton' talked about in the 2 billion cell limit. Within that partition the information will be organized by c, known as the clustering key. Together a,b and c, define a unique value of d. In this case the number of cells in a partition would be c * d. So in this example for any given pair of a and b there can only be 2 billion combinations of c and d So as you model you
Cites RussS · 2013-12 · Stack Overflow · on “Clustering Order using timeuuid CQL”
CREATE TABLE example ( a int, b int, c int, d int, PRIMARY KEY (a,b,c)) WITH CLUSTERING ORDER BY (b DESC , c ASC ) ; Is the correct syntax for ordering with multiple columns. For your particular application you actually are trying to get results from distinctly different types of queries. In Cassandra it is best to shape each table to be the response to a particular query. For example (not knowing that much about your application) select * from demo where oid = 100 and cid = 100 and ts > minTimeuuid('something'); select * from demo where oid = 100 and cid = 10; Might be better served by a table structure like create table demo_oct(oid int,cid int,ts timeuuid, body, other ...., PRIMARY KEY ((