pre SQLAlchemy integration
migrated from raq sql to sqlalchemy