Replaced pymongo with SQL (sqlalchemy)