On comparability of ideals of commutative rings