refactor db doc