Checks

ERtool performs a number of checks to ensure that your entity-relationship schema is sensible, that it respect the limitations of the run-time environment, and that it does not contains cardinality constraints so strict that they would make modifications to the database impossible. Most of the error messages are self explanatory, but some explanation is necessary about cardinality constraints.

Recall that an entity-relationship schema is a directed graph. Thus, it makes sense to speak of directed cycles, sequences of contiguous arcs (with the right direction) that form a cycle.

The first check performed by ERtool is that no such cycle is formed by total injective relationship types. In such a case, it is impossible to modify the database using only local modifications (that is, using ERW), as all entity sets along the cycle are forced to have the same cardinality. In this case ERtool will stop with an error.

Then, ERtool checks that there is no cycle formed by total relationship types. To insert an entity in a type belonging to the cycle you need to relate it with some other entity, and this initially impossible. However, if you manually insert some data in the entities, the problem is solved, so ERtool will just warn you.

Finally, it is necessary to make sure that it is impossible that an instance of the schema contains two distinct ownership paths between two entities (in particular, it must not be possible that an entity owns itself); to this purpose, ERW uses a novel algorithm that is able to discover statically if such paths can exist, looking at the type structure of the schema.