finish db