6 Writing data to ScyllaDB
This chapter covers
- Inserting, updating, and deleting data
- Executing multiple concurrent queries via batch query
- Deleting data automatically via time to live
- Updating data conditionally with lightweight transactions
If you want to learn about writes to ScyllaDB, this chapter is the place: you’ll learn how Scylla handles mutating data—creating it, updating it, and deleting it. Writes may have seemed a straightforward operation when first introduced in chapter 2, but that’s the beauty of Scylla’s implementation: it provides a less-complicated interface and hides the complexity of the operation while still exposing some neat features to fit specialized use cases. Let’s first look at inserting and updating data.
6.1 Inserting and updating data
In chapter 2, you learned how to insert and update data in ScyllaDB. It’s a skill you’ve been using; you had your first basic reviews and your data-type playgrounds. You’ve got the basics, but in this section, we’ll look deeper into how inserts and updates work, the small differences between them, and some ScyllaDB features that interact with writes and how Scylla stores data.