Added some documentation to database.py