Skip to Content
Mastering Apache Cassandra 3.x - Third Edition
book

Mastering Apache Cassandra 3.x - Third Edition

by Aaron Ploetz, Tejaswi Malepati
October 2018
Beginner to intermediate content levelBeginner to intermediate
348 pages
10h
English
Packt Publishing
Content preview from Mastering Apache Cassandra 3.x - Third Edition

Writing data

Given the ways in which Apache Cassandra has been shown to handle things such as INSERT, UPDATE, and DELETE, it is important to discuss what they have in common. They all result in writes to the database. Let's take a look at how each one behaves in certain scenarios. Assume that we need to keep track of statuses for orders from an e-commerce website. Consider the following table:

CREATE TABLE order_status ( status TEXT, order_id UUID, shipping_weight_kg DECIMAL, total DECIMAL, PRIMARY KEY (status,order_id))WITH CLUSTERING ORDER BY (order_id DESC);
The order_status table is for example purposes only, and is intended to be used to show how writes work in Apache Cassandra. I do not recommend building an order-status-tracking system ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Apache Cassandra - Second Edition

Mastering Apache Cassandra - Second Edition

Nishant Neeraj

Publisher Resources

ISBN: 9781789131499Supplemental Content