general database undo operations pulling persistent objects back from zodb in another session or program is just as straightforwardreopen the database as before and index the root to fetch objects back into memory like shelvesthe database root supports dictionary interfaces--it may be indexedhas dictionary methods and lengthand so on\pp \dbase\zodb- xpython from zodb import filestoragedb storage filestorage filestorage( ' :\temp\mydb fs'db db(storageconnection db open(root connection root(connect len(root)root keys(( ['mylist''mystr''mytuple''mydict']sizeindex root['mylist'fetch objects [[ ][ ][ ]root['mydict'{'job'('dev''mgr')'age' 'name'['bob''doe']root['mydict']['name'][- 'doebob' last name because the database root looks just like dictionarywe can process it with normal dictionary code--stepping through the keys list to scan record by recordfor instancefor key in root keys()print('% =% (key ljust( )root[key])mylist mystr mytuple mydict =[[ ][ ][ ]=spamspamspam =( 'spam' 'you'={'job'('dev''mgr')'age' 'name'['bob''doe']also like pickling and shelveszodb supports storage and retrieval of class instance objectsthough they must inherit from superclass which provides required protocol and intercepts attribute changes in order to flush them to disk automaticallyfrom persistent import persistent class person(persistent)def __init__(selfnamejob=nonerate= )self name name self job job self rate rate def changerate(selfnewrate)self rate newrate automatically updates database when changing zodb persistent class instancesin-memory attribute changes are automatically written back to the database other types of changessuch as in-place appends and key assignmentsstill require reassignment to the original key as in shelves databases and persistence