refactor Database.insert: support DictValueProvider