Chapter 5
Performing CRUD Operations
WHAT’S IN THIS CHAPTER?
- Describing create, read, update, and delete operations as they relate to data sets in a NoSQL database
- Explaining and illustrating the emphasis on create over update
- Exploring the atomicity and integrity of updates
- Explaining the ways of persisting related data
The set of essential operations — create, read, update, and delete, often popularly known as CRUD — are the fundamental ways of interacting with any data. So it’s important to see how these operations apply to the world of NoSQL. As you know, NoSQL isn’t a single product or technology, but an umbrella term for a category of databases; therefore, the implication of CRUD operations varies from one NoSQL product to the other. However, there is one predominant characteristic they all share: in NoSQL stores, the create and read operations are more important than the update and delete operations, so much so that sometimes those are the only operations. In the next few sections you learn what this implies. As the land of NoSQL is explored from the standpoint of the CRUD operations, it will be divided into subsets of column-oriented, document-centric, and key-value maps to keep the illustration within logical and related units.
The first pillar of CRUD is the create operation.
CREATING RECORDS
The record-creation operation hardly needs a definition. When you need a new record to be saved for the first time, you create a new entry. This means there should be a way to ...