push database access into database.py