Best way to merge two databases with large overlaps?

Best idea so far about merging two databases with large overlaps: