database.py: Switches to SQLAlchemy.