Learn about the basics of designing data models in the latest release of Cassandra, the popular NoSQL database capable of handling large amounts of fast-changing data.
Overview
Syllabus
Introduction
- Designing data models in Cassandra
- What you should know
- Exercise files
- Cassandra and relational databases
- Keyspaces, tables, rows, and columns
- Primary keys and secondary indexes
- Cassandra clusters
- Challenge: Design a table for a mobile app
- Solution: Design a table for a mobile app
- Install Cassandra
- Creating a keyspace and table
- Numeric data types
- String, date, and unique types
- Collection data types
- Tuple data types
- Working with JSON
- Challenge: Choose the correct data types
- Solution: Choose the correct data types
- Queries drive design
- Denormalizing: Joining or sorting
- Tuning tables to optimize queries
- Data modeling for time series
- Challenge: Define a time series table
- Solution: Define a time series table
- Secondary indexes
- Materialized views
- Virtual tables
- Challenge: Create materialized view
- Solution: Create materialized view
- Estimating data size formulas
- Example of estimating data size
- Replication in Cassandra
- Understanding consistency levels
- Challenge: Size a table
- Solution: Size a table
- Understand the query process
- Understand commit writes
- Bloom filters and query processing
- Understand deletes and tombstones
- Understand compaction
- Challenge: Diagnose performance problem
- Solution: Diagnose performance problem
- Five best practices for Cassandra data modeling
Taught by
Dan Sullivan