Operation-oriented query language approach for recursive queries—part 1. Functional definition

Timo Niemi, Kalervo Järvelin
1992 Information Systems  
So far the aspects related to efficient processing have dominated the research on recursive queries. In this paper we consider how the formulation of recursive queries can be made easier from the view point of the non-professional user -also in the context of complex recursive queries. It is obvious that the conventional rule-based way of defining is too hard and cumbersome for many non-professional users. We provide operations at a high abstraction level in terms of which the user can
more » ... his recursive queries in a compact and convenient way. In our approach recursive processing is needed for constructing transitive relationships among data. In practice, it is often very important to compute transitive relationships among several union-compatible binary relations instead of one binary relation as usual. We define the operations so that they are able to manipulate transitive relationships among several relations. For the changing needs of the user our approach contains three kinds of operations: relation-oriented, node-oriented and pathoriented operations. In this paper we specify a functional language consisting of operations of these types and give several examples on how the user can formulate his recursive queries in terms of this language. We also discuss its role in deductive databases, i.e. its integration with processing based on an extensional database. Aspects related to efficient computation have dominated the research on recursive queries so far. In this paper we rather investigate how the definition of different transitive relationships Niemi 3 could be made easier from the view point of a non-professonial user. From the view point of the user we can divide the existing approaches into three main categories: rule-oriented, graph-oriented and operation-oriented approaches. The most usual approach to recursive queries has been that the user formulates a recursive query by using logic-based rules. A typical work related to this approach has been introduced e.g. in [28] where the integration of rules with relational databases has also been considered. It is obvious that in the rule-oriented approach the user has to master recursion in the conceptual sense very well and he has to have a capability of strong recursive thinking. The definition of any recursive rule presupposes that the user is able to formulate generally a rule for transferring from one level of recursion to another and, in addition, to give the exit rule for terminating the recursion. In complex cases the definitions of many recursive rules can be associated with each other. It is obvious that in practice the construction of recursive rules, at least in complex cases, is too heavy for most non-professionals. Niemi 29 Stuttgart. Now we have to select only the part indicated by this expression from the result of the operation successors(p6, {Munich,Stuttgart, Berlin}), i.e. we need the following formulation for our example. Expression for the sample query 7: set_intersection(successors(p6,{Munich,Stuttgart,Berlin}), set_difference(nodes({Stuttgart}),bottom_nodes({Stuttgart}))) The result of this query is the set {p14,p7}. Sample query 8: Let us assume that the user wants to find all possible paths which can exist between the end products of Munich and the starting products of Berlin. The results of the operations top_nodes({Munich}) and bottom_nodes({Berlin}) contain the corresponding end and starting products. The operation paths_between_nodesets can be used to construct paths between these elements. The production system has to be considered from the view point of the whole company, i.e. in the set {Berlin, Stuttgart,Munich}. This means that our example can be described with the query expression 8. Expression for the sample query 8: paths_between_nodesets(top_nodes({Munich}),bottom_nodes({Berlin}), {Berlin,Stuttgart,Munich})
doi:10.1016/0306-4379(92)90005-8 fatcat:ocquab77arckxpdqw2swhngi5q