merge database