Schema evolution
When working with shelve, we have to address the problem of schema evolution. The class definitions define the schema for the persistent data. The class, however, is not absolutely static. If we change a class definition, the schema evolves. How will we fetch objects from the shelf after this change? A good design often involves some combination of the following techniques.
Changes to methods don't change the persisted object representation. We can classify these changes as minor because the shelved data is still compatible with the changed class definition. A new software release can have a new minor version number and users should be confident that it will work without problems.
Changes to attributes will change the persisted ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access