Refactoring database persister

The goal is to compose the gathering of attributes and the method
that writes those attributes to disk