There are many applications where we need to persist objects individually. The techniques we looked at in Chapter 10, Serializing and Saving – JSON, YAML, Pickle, CSV, and XML, were biased toward handling a single object. Sometimes, we need to persist separate, individual objects from a larger domain.
Applications with persistent objects may demonstrate four use cases, summarized as the CRUD operations: create, retrieve, update, and delete. The idea here is any of these operations may be applied to any object in the domain; this leads to the need for a more sophisticated persistence mechanism than a monolithic load or dump of all the objects into a file. In addition to squandering memory, simple loads and dumps are often less efficient than fine-grained, distinct, object-by-object storage.
Using more sophisticated storage will lead...