Making things easy with CQL3
Matt Stump
DataStax
id : user1 password : 4cffdce7d84fb56f
email : foobar@example.com
name : Foo
id : user1 password : 4cffdce7d84fb56f
email : foobar@example.com
name : Foo
id : user2 password : 4cffdcabef44fb56f
email...
id : user1 password : 4cffdce7d84fb56f
email : foobar@example.com
name : Foo
id : user2 password : 4cffdcabef44fb56f
email...
id : user1 password : 4cffdce7d84fb56f
email : foobar@example.com
name : Foo
id : user2 password : 4cffdcabef44fb56f
email...
ColumnFamily
=
SQL Table
id : user1 password : 4cffdce7d84fb56f
email : foobar@example.com
name : Foo
id : user2 password : 4cffdcabef44fb56f
email...
Keyspace
is a collection of
ColumnFamilies
id : user2 password : 4cffdcabef44fb56f
email : bar@example.com
name : Bar
email_marketing : false
permissions : admin
Col...
id : user2
password : 4cffdcabef44fb56f
email : bar@example.com
name : Bar
email_marketing : false
permissions : admin
Col...
2^128
2^128
HASH("user1") = 3
2^128
HASH("user1") = 3
id : user1 [event, time] : data
[event, time] : data
[event, time] : data
id : user1
[purchase, 2011-02-04] : bread
[event, time] : data
[login, 2011-02-04] : mainpage
[login, 2011-02-03] : mainpa...
id : user1
[purchase, 2011-02-04] : bread
[event, time] : data
[login, 2011-02-04] : mainpage
[login, 2011-02-03] : mainpa...
References
• http://www.datastax.com/docs
• http://cassandra.apache.org/doc/cql3/CQL.html
• http://www.datastax.com/dev/bl...
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language
Upcoming SlideShare
Loading in...5
×

Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language

1,284

Published on

An Introduction to Cassandra Query Language

Speaker: Matt Stump, Solutions Architect at DataStax

Matt is currently a solutions architect at DataStax and is the author of the forthcoming "Cassandra: A Beginner's Guide" published by Packt. He has an extensive background in high performance computing working with companies such as SourceNinja and Symantec. He brings a wealth of knowledge not only in Cassandra, but also in Solr, as he was an extremely early implementer of the technology.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,284
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
24
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra Query Language

  1. 1. Making things easy with CQL3 Matt Stump DataStax
  2. 2. id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo
  3. 3. id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar
  4. 4. id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin
  5. 5. id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin Column Family
  6. 6. ColumnFamily = SQL Table
  7. 7. id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin Column Family id : user1 password : 4cffdce7d84fb56f email : foobar@example.com name : Foo id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin Column Family Keyspace
  8. 8. Keyspace is a collection of ColumnFamilies
  9. 9. id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin Columns are sorted
  10. 10. id : user2 password : 4cffdcabef44fb56f email : bar@example.com name : Bar email_marketing : false permissions : admin Columns are sorted
  11. 11. 2^128
  12. 12. 2^128 HASH("user1") = 3
  13. 13. 2^128 HASH("user1") = 3
  14. 14. id : user1 [event, time] : data [event, time] : data [event, time] : data
  15. 15. id : user1 [purchase, 2011-02-04] : bread [event, time] : data [login, 2011-02-04] : mainpage [login, 2011-02-03] : mainpage [purchase, 2011-02-05] : soap
  16. 16. id : user1 [purchase, 2011-02-04] : bread [event, time] : data [login, 2011-02-04] : mainpage [login, 2011-02-03] : mainpage [purchase, 2011-02-05] : soap id : user2 [purchase, 2013-02-04] : apple [event, time] : data [login, 2013-02-03] : twitter
  17. 17. References • http://www.datastax.com/docs • http://cassandra.apache.org/doc/cql3/CQL.html • http://www.datastax.com/dev/blog/lightweight-transactions-in-cassandra-2-0
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×