From the course: Introduction to Cassandra

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Solution: Insert new data

Solution: Insert new data - Cassandra Tutorial

From the course: Introduction to Cassandra

Solution: Insert new data

(energetic music) - [Instructor] Now it's time for me to show you my solution for the challenge of adding the new data to the monsters by family table. The first task was to insert rows for each of the parents. I've done this using a batch command, inserting both Damian and Druella into the monsters by family table. You'll notice that I didn't put children in. We just have first name, last name, occupation and the spouse. So it's time to add the children. I'm going to do them one at a time, adding Drago first as a monster and also as a child for Damian and Druella. Next, it's time to add Jadyn. I'm going to do this using the plus operator to add her as an additional child for each of the adults rather than redefining the whole list of children. So that's my solution. I hope yours worked as well. Take a look at your table and see if it looks correct.

Contents