Database merge