更新时间:2021-07-03 00:20:28
封面
版权信息
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Getting Up and Running with Cassandra
What is big data?
Challenges of modern applications
Why not relational databases?
How to handle big data
What is Cassandra and why Cassandra?
Horizontal scalability
High availability
Write optimization
Structured records
Secondary indexes
Materialized views
Efficient result ordering
Immediate consistency
Discretely writable collections
Relational joins
MapReduce and Spark
Rich and flexible data model
Lightweight transactions
Multidata center replication
Comparing Cassandra to the alternatives
Installing Cassandra
Installing the JDK
Installing on Debian-based systems (Ubuntu)
Installing on RHEL-based systems
Installing on Windows
Installing on Mac OS X
Installing the binary tarball
Bootstrapping the project
CQL—the Cassandra Query Language
Interacting with Cassandra
Getting started with CQL
Creating a keyspace
Selecting a keyspace
Creating a table
Inserting and reading data
New features in Cassandra 2.2 3.0 and 3.X
Summary
The First Table
How to configure keyspaces
Creating the users table
Structuring of tables
Table and column options
The type system
Strings
Integers
Floating point and decimal numbers
Timestamp
UUIDs
Booleans
Blobs
Collections
Other data types
The purpose of types
Inserting data
Writing data does not yield feedback
Partial inserts
Selecting data
Missing rows
Selecting more than one row
Retrieving all the rows
Paginating through results
Inserts are always upserts
Developing a mental model for Cassandra
Organizing Related Data
A table for status updates
Creating a table with a compound primary key
The structure of the status updates table
UUIDs and timestamps
Working with status updates
Extracting timestamps
Looking up a specific status update
Automatically generating UUIDs
Anatomy of a compound primary key
Anatomy of a single-column primary key
Beyond two columns
Multiple clustering columns
Composite partition keys
Composite partition key table
Structure of composite partition key tables