Merge database