How to save big "database-like" class in python

Posted by Rafal on Stack Overflow See other posts from Stack Overflow or by Rafal
Published on 2010-06-07T15:52:15Z Indexed on 2010/06/07 16:02 UTC
Read the original article Hit count: 306

Filed under:
|
|

Hi there,

I'm doing a project with reasonalby big DataBase. It's not a probper DB file, but a class with format as follows: DataBase.Nodes.Data=[[] for i in range(1,1000)] f.e. this DataBase is all together something like few thousands rows. Fisrt question - is the way I'm doing efficient, or is it better to use SQL, or any other "proper" DB, which I've never used actually. And the main question - I'd like to save my DataBase class with all record, and then re-open it with Python in another session. Is that possible, what tool should I use? cPickle - it seems to be only for strings, any other?

In matlab there's very useful functionality named save workspace - it saves all Your variables to a file that You can open at another session - this would be vary useful in python!

© Stack Overflow or respective owner

Related posts about python

Related posts about output