Re: Dictionary or Database—Please advise

Benjamin Kaplan benjamin.kaplan at case.edu
Fri Feb 26 11:11:15 EST 2010


On Fri, Feb 26, 2010 at 10:58 AM, Jeremy <jlconlin at gmail.com> wrote:

> I have lots of data that I currently store in dictionaries.  However,
> the memory requirements are becoming a problem.  I am considering
> using a database of some sorts instead, but I have never used them
> before.  Would a database be more memory efficient than a dictionary?
> I also need platform independence without having to install a database
> and Python interface on all the platforms I'll be using.  Is there
> something built-in to Python that will allow me to do this?
>
> Thanks,
> Jeremy
>


Python has SQLite 3 built-in and there are wrappers for MySQL and PostgreSQL
on all major platforms. Any one of them will work- databases have the
advantage that they're stored on the disk so you don't have all of it in
memory simultaneously.


> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100226/142589b1/attachment.html>


More information about the Python-list mailing list