CHAPTER 20 ONTROL AND OPTIMIZATION STRATEGIES IN THE IMPLEMENTATION OF LDL R. Krishnamurthy Carlo Zaniolo 20.1 INTRODUCTION The Logic Data Language, LDL, combines the expressive power of a high- level, logic-based language (such as Prolog) with the nonnavigational style of relational query languages, where the user need only supply a correct query, and the system (i.e., the compiler/optimizer) is expected to devise an efficient execution strategy for it. Consequently, the optimizer is given the responsibility of choosing an optimal execution--a function similar to that of the query optimizer in a relational database system. A relational system uses knowledge of storage structures, information about database statistics, and various estimates to predict the cost of execution schemes chosen from a predefined search space and to select a minimum cost execution in such a space. An LDL system offers to a user all the benefits of a database language-- including the elimination of the impedance mismatch between the language and the query language. In addition, its rule-based deductive capability and its unification-based pattern matching capability make it very suitable for knowledge-based and symbolic applications. The power of LDL is not without 329