database finish