Search code examples
pythondatabasesqlitewxpython

The value of databases in wxpython


I have a wxpython script that opens 10's, or 100's or 1000's or more items from a users system. I store this information in memory and use what is needed by my script. Later if the user decides to save I store the needed information in a flat file that will be opened later when the user does an "open". Is a database needed? What makes databases valuable? Sure call it a newbie question but to be sure my program/application/python script is 100% functional, I am just working in optimization at this point.


Solution

  • Databases aren't really an optimization. They just provide a good way to store and retrieve data. If you happen to be dealing with a lot of data, then databases are a good place to store that data. Then you can do various queries against the database and what-not. If your application has a complex configuration, you might also find a database useful. Mozilla Firefox uses SQLite for a lot of different things with their browser for example.

    You might find the following article helpful in seeing how to use a database with your wxPython application: