apply SQLAlchemy and ORM