Update the hierarchy of reference table.