replace raw sqlite3 access with SQLAlchemy (w/o OR mapping)