Now consider the reverse process. As will be shown below, in case kodasil model features of the records or objects in a set is itself. For a relational view is not so simple, because ligament (links) are made implicitly - coincidentally values ​​of tuples from different relations, and we have to present it as a functional relationship. In Shipman described very good way to such a view. We describe objects "student" and "studies", and single-valued functions they produce are not objects, and the whole number, ie, their values ​​are treated as scalar values. Appropriate places in the descriptions are of the form: DECLARE Students ENTITY DECLARE # stud (student) INTEGER
DECLARE is studying ENTITY DECLARE # studio (studying) INTEGER DECLARE # course (study) -> INTEGER
DECLARE rate 0 - »ENTITY DECLARE # course (s) -> INTEGER
Using these descriptions, we can define the multi-valued function "courses", whose argument is a student, and the value - many courses, students learn:
DEFINE courses (students) with a course IN SUCH THAT SOME IN E HAS study
# Stud (student) = # stud (E) AND # Course (E) = # rate (C)
It is interesting to note that the body of the function contains the "join predicate" associating attributes "stud" relationship "student" and "learns" how to do it in a relational language such as QUEL. In fact, Shipman shows the steps to transfer the request to the QUEL Dapleksa using this scheme.
10.6. Communication with abstract data types

The concept of an abstract data type is characterized by the fact that the type is implicitly determined by the specified operations on it, and only those operations can be applied to the values ​​of that type, and only those operations have access to the structure and presentation of the data. For example, the type of "logic" can be defined not as a primitive, and six functions (AND, OR, NOT, OR, TRUE, FALSE), and to realize, for example, by means of two integer values ​​0 and -1 or empty and non-empty lists and etc.
Copyright ©