SQLAlchemy integration

I think we should leave this for another pull request if we want to do that.