64 kb • Value : Anything, up to 2 Gb • Timestamp : A 64 bit Integer • TTL : Time To Live (optional) • A special type : Counter 2 Data Structures Wednesday, March 6, 13
Has a key that can be any type • Has a token for its key • Column orders are defined by comparators • Static and Wide Rows 3 Data Structures Wednesday, March 6, 13
Key and Default Validation Class • Comparator • A column family is made to answer a query • Made for denormalized data • Made to avoid joins and table scans 4 Data Structures Wednesday, March 6, 13
ReplicationStrategy • With a ReplicationFactor ★ Cluster • Nodes in a token ring • Can span datacenters • Can have Virtual nodes since 1.2 5 Data Structures Wednesday, March 6, 13
different clients • Commands are binaries • Con : too static, verbose ★ CQL (cqlsh -2 and -3) • High level query language • Made to look like SQL • CQL 2 is kind of a beta for CQL 3 6 Query Cassandra Wednesday, March 6, 13
index ★ Secondary indexes • A hashtable represented by a ColumnFamily • Good for small number of values ★ Wide Row index • Just like plain old indexes, but must be maintained ★ Composite Column Indexes • These are actually inverted indexes 7 Indexing Wednesday, March 6, 13
★ Commit log • Written there first if defined, for failure tolerance ★ Memtable • Writes in memory, considered successful • Flushes to SSTable ★ SSTable • Compacts data by a factor of 10 when compacted • Contains all writes for a row 8 Writing Wednesday, March 6, 13
writes ★ Cassandra is a BASE database ★ Achieve linear performance with eventual consistency 11 Consistency The CAP Theroem Consistency Partition Tolerance Availability Wednesday, March 6, 13