db tests and doc