K = (A, P, T), where

A = {AbstractClass, RecType, SetType, String, Course, Teacher, Professor, Student, GradStudent},
P = {value, member, enrolls, taughtby, degree}, and the set T of assertions consists of:

![0_image_2.png](0_image_2.png)

![0_image_3.png](0_image_3.png)

GradStudent

![0_image_4.png](0_image_4.png)

AbstractClass

![0_image_1.png](0_image_1.png)

![0_image_0.png](0_image_0.png)

Below we discuss the effectiveness of the translation ψ . First of all observe that the ALUNI knowledge base ψ( S ) resulting from the translation of an object-oriented schema S
may admit models that do not have a direct counterpart among legal database instances of S. More precisely, both an interpretation of ψ(S) and a database instance of S can be viewed as a directed labeled graph: In the case of an interpretation, the nodes are domain individuals and the arcs are labeled with roles. In the case of a database instance, the nodes are either object identifiers or active values, and an arc either connects an object identifier to its associated value (in which case it is labeled with value), or is part of the sub-structure representing a set or record value (in which case it is labeled with member or with an attribute, in accordance with the type of the value). In a legal database instance of S, a value v is represented by a sub-structure that has the form of a finite tree with v as root, set and record values as intermediate nodes, and objects identifiers as leaves.  Clearly, such a substructure does not contain cycles. Conversely, in a model of ψ( S ), there may be cycles involving only nodes that are instances of SetType and RecType and in which all roles are different from value. We call such cycles bad . A model containing bad cycles cannot be put directly in correspondence with a legal database instance. Also, due to the open semantics of records one cannot adopt a different translation for which bad cycles in the model are ruled out.

Example 5.6 Consider the object-oriented schema S , containing a single class declaration

## Class C Type-Is Record A 1 : Record A 2 : Record A 3 : C End End End
