For database merge