database change keys from X and Y to _id and value