[DB-SIG] Modifying methods or attributes of persistent objects

roy roydobbins at earthlink.net
Thu Aug 12 23:40:38 CEST 2004


I am attempting to implement a small project using persistent objects 
(pickle). This works fine for storing a small class hierarchy, however, I am 
seeing a problem emerging when, as the project evolves, I see the need to say 
add new methods, or possibly add new attributes. for persistent objects 
ALREADY stored earlier, these new methods or attributes are not defined.

This seems to be a major maintenance issue. What if down the road I have a 
well establised application, with fairly large database of objects. Now I 
want to create a new version, which has new methods, etc. I see no easy way 
to do this, other than to delete the entire database (pickled in this case) 
then add the whole class hierarchy and however many instances I had stored 

Am I missing something? Is there a cleaner, easier way to upgrade an 
application with enhanced objects? I think that conceptually it doesnt matter 
what kind of database implementation one has here, whether it is a RDBMS, a 
simple pickled store or whatever, the fact remains that previously created 
objects cannot (easily) acquire new attributes and methods.

Anyone have ideas on this issue, or can you point me to something in the 
documentation which discusses this?

Many thanks
  --Roy Dobbins

More information about the DB-SIG mailing list