Avoiding loops in the data model