There are many applications where we need to persist a large number of distinct objects. The techniques we looked at in Chapter 10, Serializing and Saving - JSON, YAML, Pickle, CSV, and XML, were biased toward persistence for a single, monolithic object. Sometimes, we need to persist separate, individual objects from a larger domain. For example, we might be saving blog entries, blog posts, authors, and advertisements; each of which must be handled separately.
In Chapter 11, Storing and Retrieving Objects via Shelve, we looked at storing distinct Python objects in a shelve data store. This allowed us to implement the CRUD processing on a domain of individual objects. Each object can be created, retrieved, updated, or deleted without having to load and dump the entire file.
In this chapter, we'll look at mapping Python objects to a...