What is read before writing to NoSQL?

I read in a book: "Cassandra is a NoSQL database and facilitates reading before writing instead of a relational model."

What does read-before-write mean in a NoSQL context?

+4
source share
1 answer

Reading before writing means that you check the value of the cell before modifying it.

Read-Before write is a huge anti-template in Cassandra. Any book you read that encourages you to do so should be viewed with suspicion. Typically, Cassandra entries are performed without any information about the current state of the database. One of the side effects of this is that all entries in Cassandra are actually update operations. This allows you to record very quickly, but has some limitations.

If you really need to check the state of the database before writing, Cassandra provides Check and Install (CAS) operations that use PAXOS to set the state of the database before changing the record. They are written as update table set x = 3 if y = 1. CAS requests are several orders of magnitude slower than a normal C * entry, and should be used sparingly.

+7

All Articles