db merging