[Tutor] database question

Alan Gauld alan.gauld at btinternet.com
Fri Jun 29 22:20:58 CEST 2007


"Luke Jordan" <luke.jordan at gmail.com> wrote

> I've created a database as a shelve, where each value in the shelve 
> file is
> a record class instance that has attributes representing fields. 
> Let's say I
> enter 300 records in the shelve, then I decide to add a field to 
> future
> records, or remove a field from future records. How can I update the
> existing records to include the new fields?

You will need to read in each record, update it and write it back 
again.
A shelve is not a relational database so you cannot do mass updates
in situ

Alan G 




More information about the Tutor mailing list