[Tutor] Creating & Handling lots of objects

Alan Gauld alan.gauld at freenet.co.uk
Sat Dec 4 01:18:10 CET 2004

> Although I have never done so, I believe you can also 
> store/manipulate objects in a database.

You can but its a lot slower than memory - but a lot more 
scaleale too!

> Has anyone ever worked this option?

Yes, lots of times. In fact most large scale projects will 
need to save objects to some kind of persistent store eventually.
This could be a text file (see my tutor for an example) or a 
full blown database.

Foor simple persistence the pickle and shelve modules are useful.
If you need to do random access and searches then a full RDBMS 
like MySQL will be better.

An Object database might also work - I believe Zope has one 
but I've never used it, nor even read up on it...

Alan G
Author of the Learn to Program web tutor

More information about the Tutor mailing list