Update Relations in the Database