From the course: Introduction to Cassandra
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Modifying data - Cassandra Tutorial
From the course: Introduction to Cassandra
Modifying data
- [Instructor] Now our monsters are set up, but we need to be able to make changes to individual monster rows as the information changes. We'll want to be able to update the rows or delete them as needed. So in our CRUD Functions, we've already covered creating and reading, and now it's time to take a look at update and delete. As time goes on, the job descriptions could change for monsters or they might have new children. There are some changes that require deleting and recreating rows, and we'll cover those as well. Let's take a quick look at the tables we have before diving into how update and delete work in Cassandra. To update data in your database, you're going to use the UPDATE command. This template shows you how to craft your UPDATE command, but let's get a little guidance on how UPDATE works. So the keyspace name is only required if you have executed the USE keyspace command. Unlike the INSERT command, the UPDATE command supports counters. You can't update a primary key…