June 2019
Beginner to intermediate
770 pages
19h 24m
English
One of the strengths of the shelve module is allowing us to persist distinct items very simply. This imposes a design burden to identify the proper granularity, of the items. Too fine a granularity and we waste time assembling a container object from pieces scattered through the database. Too coarse a granularity, and we waste time fetching and storing items that aren't relevant.
Since a shelf requires a key, we must design appropriate keys for our objects. We must also manage the keys for our various objects. This means using additional attributes to store keys, and possibly creating additional collections of keys to act as indices for items on the shelf.
A key used to access an item in a shelve database ...
Read now
Unlock full access