update db instead of rewrite db