SQLAlchemy integration

I wouldn't worry too much about it. The other way we could do it is by creating a mixin and pulling it in, but that wouldn't really remove much code so I'd say we not worry for now.