refactoring : trying to make database an "normal" data source, like yml file