TStore.py is an easy to use semantic database storage class useful for aggregating random data.

http://www.gnucitizen.org/static/blog/2006/07/tstore_py.txt

You can use the class by importing it in any python project. You insert triples in the form of (predicate, subject, object). Once these triples are inside the store, you can query them and extract meaning. Check the Semantic Web project for more information.

I personally use this code to store and query random data without carrying much about the structure of the database.