I. Khalil Ibrahim, V. Dignum, W. Winiwarter, E. Weippl, Logic Based Approach to Semantic Query Transformation for Knowledge Management Applications,

Similar documents
Data integration supports seamless access to autonomous, heterogeneous information

Query Rewriting Using Views in the Presence of Inclusion Dependencies

Describing and Utilizing Constraints to Answer Queries in Data-Integration Systems

Query Containment for Data Integration Systems

Distributing the Derivation and Maintenance of Subset Descriptor Rules

MIWeb: Mediator-based Integration of Web Sources

Ontology-Based Schema Integration

VALUE RECONCILIATION IN MEDIATORS OF HETEROGENEOUS INFORMATION COLLECTIONS APPLYING WELL-STRUCTURED CONTEXT SPECIFICATIONS

Data Integration by Describing Sources with Constraint Databases

following syntax: R ::= > n j P j $i=n : C j :R j R 1 u R 2 C ::= > 1 j A j :C j C 1 u C 2 j 9[$i]R j (» k [$i]r) where i and j denote components of r

Enhancing Datalog with Epistemic Operators to Reason About Systems Knowledge in

Designing Views to Answer Queries under Set, Bag,and BagSet Semantics

A MODEL FOR ADVANCED QUERY CAPABILITY DESCRIPTION IN MEDIATOR SYSTEMS

Encyclopedia of Database Systems, Editors-in-chief: Özsu, M. Tamer; Liu, Ling, Springer, MAINTENANCE OF RECURSIVE VIEWS. Suzanne W.

Logic Programs for Consistently Querying Data Integration Systems

Overview of the Integration Wizard Project for Querying and Managing Semistructured Data in Heterogeneous Sources

A Semantic Solution for Data Integration in Mixed Sensor Networks

INCONSISTENT DATABASES

Revisiting Blank Nodes in RDF to Avoid the Semantic Mismatch with SPARQL

Conjunctive Query Containment in Description Logics with n-ary Relations

Mediating and Metasearching on the Internet

Horizontal Aggregations for Mining Relational Databases

Alon Levy University of Washington

An Approach to Resolve Data Model Heterogeneities in Multiple Data Sources

Constraint Solving. Systems and Internet Infrastructure Security

A Logic Database System with Extended Functionality 1

A CORBA-based Multidatabase System - Panorama Project

Architecting Object Applications for High Performance with Relational Databases

Adding rules into database systems

Garlic Query Services Catalog. Data Source. Data Source

Datalog. Susan B. Davidson. CIS 700: Advanced Topics in Databases MW 1:30-3 Towne 309

An Experimental CLP Platform for Integrity Constraints and Abduction

Content-based Management of Document Access. Control

August 1998 Answering Queries by Semantic Caches Godfrey & Gryz p. 1 of 15. Answering Queries by Semantic Caches. Abstract

Towards a Semantic Web Modeling Language

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

A Data warehouse within a Federated database architecture

Logic Programming and Resolution Lecture notes for INF3170/4171

Optimising Mediator Queries to Distributed Engineering Systems

Stanford Warren Ascherman Professor of Engineering, Emeritus Computer Science

Foundations of Databases

Designing and Implementing an Object Relational Data Warehousing System

Computing Query Answers with Consistent Support

Answering Queries with Useful Bindings

Accessing Data Integration Systems through Conceptual Schemas

An Efficient Design and Implementation of a Heterogeneous Deductive Object-Oriented Database System

Navigational Integration of Autonomous Web Information Sources by Mobile Users

An Ameliorated Methodology to Eliminate Redundancy in Databases Using SQL

On the Role of Integrity Constraints in Data Integration

Who won the Universal Relation wars? Alberto Mendelzon University of Toronto

Practical Aspects of Query Rewriting for OWL 2

MDDQL-Stat: data querying and analysis through integration of intentional and extensional semantics.

A Practical Algorithm for Reformulation of Deductive Databases

Outline. q Database integration & querying. q Peer-to-Peer data management q Stream data management q MapReduce-based distributed data management

Logical reconstruction of RDF and ontology languages

Lecture 9: Datalog with Negation

Improving Resource Management And Solving Scheduling Problem In Dataware House Using OLAP AND OLTP Authors Seenu Kohar 1, Surender Singh 2

Migrating to Object Data Management

Wrapper 2 Wrapper 3. Information Source 2

Attribute-Pair Range Rules

An Algorithm for Answering Queries Efficiently Using Views Prasenjit Mitra Infolab, Stanford University Stanford, CA, 94305, U.S.A.

}Optimization Formalisms for recursive queries. Module 11: Optimization of Recursive Queries. Module Outline Datalog

A Commit Scheduler for XML Databases

}Optimization. Module 11: Optimization of Recursive Queries. Module Outline

Query Transformation of SQL into XQuery within Federated Environments

fied by a regular expression [4,7,9,11,23,16]. However, this kind of navigational queries is not completely satisfactory since in many cases we would

Hermes - A Framework for Location-Based Data Management *

Updates through Views

Finding Equivalent Rewritings in the Presence of Arithmetic Comparisons

Enterprise Workflow Resource Management

Part I Logic programming paradigm

Detecting Logical Errors in SQL Queries

Integrating Data Sources Using A Standardized Global Dictionary

Novel Materialized View Selection in a Multidimensional Database

XQuery Optimization Based on Rewriting

Logical Data Modeling: Part 12

Distributed Database

Data Integration: Datalog

An ODBC CORBA-Based Data Mediation Service

A Framework for Ontology Integration

Recursive query facilities in relational databases: a survey

Reasoning on Business Processes and Ontologies in a Logic Programming Environment

Deductive Databases. Motivation. Datalog. Chapter 25

Inference in Hierarchical Multidimensional Space

Semantic Data Extraction for B2B Integration

FOL Modeling of Integrity Constraints (Dependencies)

Semantic Query Optimization for Bottom-Up. Evaluation. fgodfrey, jarek, University of Maryland at College Park

The Context Interchange Approach

Integrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Analysis of Query Processing and Optimization

An ECA Engine for Deploying Heterogeneous Component Languages in the Semantic Web

An Optimization of Disjunctive Queries : Union-Pushdown *

1. The Relational Model

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Data Integration A Logic-Based Perspective

Advances in Data Management - Web Data Integration A.Poulovassilis

Integrating HTN Planning and Semantic Web Ontologies for Efficient Information Integration

sketchy and presupposes knowledge of semantic trees. This makes that proof harder to understand than the proof we will give here, which only needs the

Transcription:

I. Khalil Ibrahim, V. Dignum, W. Winiwarter, E. Weippl, Logic Based Approach to Semantic Query Transformation for Knowledge Management Applications, Proc. of the International Conference on Knowledge Management (I-Know 02), Graz, Austria, 2002.

Logic Based Approach to Semantic Query Transformation for Knowledge Management Applications Ismail Khalil Ibrahim, Virginia Dignum Utrecht University, The Netherlands {ismail, virginia}@cs.uu.nl Werner Winiwarter University of Vienna, Austria werner.winiwarter@univie.ac.at Edgar Weippl Software Competence Center Hagenberg, Austria edgar.weippl@scch.at Abstract: In this paper, we address the problem of integrating answering queries using views (and more generally query folding) with semantic query optimization into one optimizer that uses the semantic knowledge about information sources expressed as integrity constraints to support the query processing and optimization of knowledge management applications. Key Words: data integration, semantic query transformation, answering queries using views, knowledge management applications. Categories: H.1, H.2, H.3, H.4. 1. Introduction Knowledge management systems rely more and more on highly organized and integrated data to support informed and comprehensive decision-making. Data integration is vital to knowledge management systems because it weaves together information needed to make strategic decisions, provides quick and convenient access to data, improves the quality and comprehensiveness of the data, promotes consistency and reduces cost of data collection, storage and processing, and improves existing legacy infrastructure management systems to better serve society needs. The task of a data integration system [Wiederhold, 92] is to provide users with an automated method to access, relate, and combine data stored in multiple, autonomous, possibly heterogeneous sources [Levy et al., 95]. As a consequence, answering queries in data integration systems became a critical problem that involves selecting the relevant information sources and generating query plans to retrieve and combine the data in a uniform way. Significant progress has been made in source selection and plan generation [Adali et al., 96], [Bressan and Goh, 98], [Sheth and Larson, 90]; the critical issue has been shifting to query processing and optimization. The traditional cost-based query optimization techniques are computationally expensive to be used in data integration systems because of the high connection

overheads, high computation time, financial charges and temporary unavailability, as well as other problems associated with manipulating sources with different data models, semantics, and access methods [Adali et al., 96]. Query processing and optimization in data integration systems is closely related to the problem of query folding [Adali et al., 96], [Gryz, 98], [Qian, 96] and the problem of semantic query optimization [Chakravarthy et al., 90], [Minker, 87]. Query folding [Qian, 96] is the general activity of determining how a query can be answered using a set of resources, which can be relation fragments, materialized views, cached results, or component sources of a network. Semantic query optimization [Chakravarthy et al., 90] is the process of optimizing database queries using semantic information expressed as integrity constraints. Semantic query optimization is concerned with the transformation of queries into semantically equivalent queries with higher potential for efficient evaluation. Semantic query optimization can help in providing local optimization to subqueries and has the potential for reducing unnecessary data transmission when the query can be answered without accessing the database if enough knowledge is contained in the integrity constraints [Bressan and Ibrahim, 99]. Query folding on the other hand has obvious applications in query processing in distributed databases and query answering in federated databases in addition to its potential for centralized databases [Qian, 96]. Answering queries using views [Chakravarthy et al., 90], [Duschka and Genesereth, 97], [Levy et al., 95] as part of the query folding problem has applications also in global information systems, mobile computing, and maintaining physical data independence [Levy et al., 95] and has the potential for optimizing query evaluation in information integration systems because it reduces the need to re-compute views and/or data being queried and hence speeds up the querying of large amounts of data. In this paper, we address the problem of answering queries using views (and more generally query folding) with semantic query optimization into one optimizer that uses the semantic knowledge about information sources expressed as integrity constraints to support the query processing and optimization in knowledge management systems. 2. Query Processing in Data Integration Systems In a data integration system, query processing is performed as follows: An information mediator [Wiederhold, 92] maintains a global model that describes a set of integrated information sources. User queries are posed in terms of a mediated schema, that is a set of virtual relations in the sense that they are not stored anywhere which are designed for a particular data integration system. To allow the data integration system to retrieve data, each information source is wrapped by a relation that translates the component information source schema into a view definition over the mediated schema. In order to answer a user query, the query should be rewritten in a way to be defined over these view schemas, which are the only available information sources. When the information mediator receives a query, it decomposes the query into a set of subqueries expressed in the global mediation model to retrieve and combine data from individual information sources. The wrappers will translate the subqueries then into the corresponding query language before the subqueries are executed. Finally, the

information mediation system combines the retrieved data and presents the results to the user [Adali et al., 96], [Duschka and Genesereth, 97a], [Friedman et al., 99]. We believe that the power of answering queries using views can be considerably enhanced by taking into account integrity constraints that are known to hold on the base information sources [Gryz, 98]. The rewritten query, which is expressed now in terms of the component information source schema rather than the global mediated schema, is transformed into a semantically equivalent set of queries that may be processed faster and more efficiently than the original one. Our focus in this paper will be on query rewriting, i.e. translating user queries, which are defined over the global mediated schema, into an equivalent query defined over the component information source schemas. We consider the problem of finding a rewriting that uses one or more of the available information sources, the problem of finding a partial rewriting, and finding a complete rewriting, i.e. a rewriting that uses only the available information sources. The rewriting is obtained by specifying a mapping algorithm between the head of the query and the set of the available view definitions of the information sources. The algorithm takes as input a conjunctive user query defined over the global mediated schema and, depending on a set of conjunctive view definitions and substitution rules, generates as output an equivalent rewriting of the user query, i.e. a conjunctive query that returns the same set of results as the original one. 3. Theoretical Background We use Datalog to express queries, views, and integrity constraints. The reader unfamiliar with the syntax and semantics of Datalog can consult [Abiteboul et al., 95], [Minker, 87], or [Ullman, 89] among the many textbooks and papers available on this topic. An information source (front-and back office applications, legacy and mainframe systems, data warehouses and data marts, flat files, transactional databases, and e- commerce applications) consists of a set of base relations R as its extensional database, a set of view definitions V as its intentional database, and a set of integrity constraints IC. The base relations are expressed as ground unit clauses of the form: R(A 1,, A n ) where R is a base relation predicate and A 1,, A n are the arguments. The view definitions are expressed as non-recursive range-restricted definite Horn clauses (i.e. with at least one atom in the body and exactly one atom in the head) of the form: V R 1,, R n such that: V is a view literal whose arguments are distinct variables R i is a base relation literal Each variable in the head of the view definition also appears in the body X k V j..k= 1,.., n j= 1,...,k R i such that X k R i Integrity constraints are expressed as non-recursive range-restricted Horn clauses.

We consider conjunctive queries or Project-Select-Join (or PSJ for short) queries. The head of a conjunctive query is a query literal and its body consists of base literals and built-in predicates Q R 1,, R n, C 1,, C m Where Q is a query literal whose arguments are distinct variables, R 1,, R n are base relation literals, C 1,, C m are built-in predicates. Variables in the head of the query are distinguished. We assume that every distinguished variable also appears in the body. As a convention we use X, Y, for distinguished variables, W, U, for other variables, and A, B, for constants. Suppose that we have a set of relational view definitions stored in the data integration system. We consider the problem of: Given a user query Q, how to find a rewriting Q' using one or more of the available views such that Q is contained in Q', i.e. the value of Q is a subset of Q' in every database. It is well known that containment implies equivalence. We consider the problem of finding partial rewriting and finding complete rewriting. A partial rewriting of a query Q using a set of views V is a conjunctive query Q' whose head is a query literal, such that Q' Q and the body of Q' contains one or more view literals defined in V (it may contain base literals). A complete rewriting of Q using V is a partial rewriting of Q using V whose body contains views and built-in predicates only (it may not contain base literals). 4. Motivational Example As an example let us consider the task of searching bibliographic records of technical reports from digital libraries available on the WWW. There are different online collections available on the WWW, which provide such information. Unfortunately, up to now we do not have a unified catalog of bibliographic records like the OCLC for digital libraries. Probably the best example of such a digital library containing technical reports is the Networked Computer Science Technical Reports Library (http://cs-tr.cs.cornell.edu/) (NCSTRL) but this also provides only information of the sites that have installed the same software package (Dienst) and created their bibliographic records using the same format (RFC 1807). Let us suppose that there are two information sources providing listings of technical reports that can be downloaded from the WWW. The first one provides information about titles, authors, and subjects of the technical reports. The second one provides information about the years, titles, and the URL from which you can download the report. Suppose we want to find which technical reports authored by Gio Wiederhold can be downloaded from Stanford Web site as well as their subjects. None of these two digital libraries in isolation can answer this query. However, by combining data from multiple sources, we can answer queries like this one, and even more complex ones. To answer our query, we would first send a query q 1 to the first site (S 1 ) to retrieve the titles and subjects of all the technical reports authored by Gio Wiederhold, and then send another query q 2 to the second site (S 2 ) to retrieve the titles of all the technical reports that can be downloaded from Stanford site. Finally, join the results of the queries q 1 and q 2 to get the answer to our query. The reader may start thinking about the network performance issues, the high connection overheads, high computation time, financial charges, and temporary

unavailability, as well as other problems of manipulating sources with different data models, semantics, and access methods [Adali et al., 96]. 5. A Logic Based Approach to Semantic Query Transformation In traditional databases, query evaluation can be partitioned into a compilation phase followed by a modification and evaluation phase [Chakravarthy et al., 90]. [Chakravarthy et al., 90] introduced a two phased approach to using integrity constraints for optimizing queries over a single database; the semantic compilation phase where integrity constraint fragments, called residues, are computed and associated with database rules. The result is a set of semantically constrained axioms. When a query is given to the system, the semantic transformation phase uses these stored residues to generate semantically equivalent queries that may be processed faster than the original query. In our approach to query processing and optimization in information integration systems, four phases are identified: First phase: The substitution rules generation phase where base relations R are expressed in term of the view definitions V. The result of this phase is a set of substitution rules S that contain all the necessary information for the query rewriting phase. Second phase: The semantic compilation phase, which is the same as the one introduced in [Chakravarthy et al., 90], where integrity constraints ICs are used to compute residues. These residues are then attached to database rules. The resulting semantically constrained axioms SCA are filtered and stored for later use. Third phase: The query rewriting phase; when a query Q defined over the base relations is posed to the system, this phase uses the set of substitution rules generated earlier to rewrite the query in such a way as to generate an equivalent query Q' that produces the same answer as the original one but defined over the component views. Fourth phase: The semantic query transformation phase which uses the semantically constrained axioms to transform the rewritten query Q' into one or more semantically equivalent queries. 6. Conclusion In this paper, we present a logic-based approach to semantic query transformation [Ibrahim, 01]. By integrating semantic query optimization and answering queries using views (and more generally query folding) we can considerably enhance query processing and optimization in distributed, possibly heterogeneous knowledge management systems by trying to push the costly operations to the sources as much as possible and hence reducing processing costs and/or response time. In our approach, each of the component information sources is seen as consisting of one or more materialized views. Materialized views, also called view instances, are the stored results of previously executed queries. Only the component information sources schemas and view definitions, i.e. the queries that generate the views, are stored in the data integration system. The semantic query compilation takes place in the component databases a priori and only the semantically constrained axioms are stored in the data integration system. In contrast to cost-based query optimization,

where the mediator does not have access to source statistics information and it may not be easy to model the source's performance, the view definitions and the semantically constrained axioms stored in the mediator contain enough knowledge to increase the potential for efficient query evaluation. For instance, in the simplest case, a query may be answered without accessing a particular data source if it is known a priori that there is no answer or all the data at that source is inconsistent with the constraints. References [Abiteboul et al., 95] Abiteboul, S., Hull, R., and Vianu, V., Foundations of Databases. Addison Wesley, 1995. [Adali et al., 96] Adali, S., Candan, K., Papakonstantinou, Y., and Subrahmanian, V. S., Query Caching and Optimization in Distributed Mediator Systems. In Proc. Conf., ACM SIGMOD, pages 137-148, 1996 [Bressan and Ibrahim, 99] Bressan S., and Ibrahim, I. K., Semantic Query Transformation for the Integration of Autonomous Information Sources. In Proc. Conf., Application of Prolog (INAP'99), 1999. [Chakravarthy et al., 90] Chakravarthy, S., Grant, J., and Minker, J., Logic Based Approach to Semantic Query Optimization. ACM Transactions on Database Systems, 1990. [Duschka and Genesereth, 97] Duschka, O., and Genesereth, M., Answering Queries Using Recursive Views. In Proc. ACM SIGACT-SIGMOD-SIGART Symposium on Principles Of Database Systems (PODS), Tucson, Arizona., 1997. [Friedman et al., 99] Friedman, M., Levy, A., and Millstein, T., Navigational Plans for Data Integration, In Proc. National Conference on Artificial Intelligence, 1999. [Gryz, 98] Gryz, J., An Algorithm for Query Folding with Inclusion Dependencies. In Proc. Workshop on Intelligent Information System, 1998. [Ibrahim, 01] Ibrahim, I. K., Semantic Query Transformation for the Intelligent Integration of Information Sources, Ph.D. thesis, Gadjah Mada University, 2001. [Levy et al., 95] Levy, A., Mendelzon, A., Sagiv, Y., and Srivastava, D., Answering Queries Using Views. In Proc. 14th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), pages 95-104, San Jose, CA, 1995. [LIoyd, 84] Lloyd, J., Foundation of Logic Programming. Springer-Verlag, 1984. [Minker, 87] Minker, J., Foundation of Deductive Databases and Logic Programming. Morgan Kaufmann, 1987. [Qian, 96] Qian, X., Query Folding. In Proc. Data Engineering (ICDE), pages 48-55, New Orleans, LA, 1996. [Sheth and Larson, 90] Sheth, A., and Larson, J., Federated Database Systems for Managing Distributed, Heterogeneous, and Autonomous Database. ACM Computing Surveys, 22, 3, pages 183-236, 1990. [Ullman, 89] Ullman, J., Principles of Database and Knowledge Base Systems Volumes I, II. Computer Science Press, Rockville MD, 1989. [Wiederhold, 92] Wiederhold, W., Mediators in the Architecture of Future Information Systems. IEEE Computer, pages 38-49, March 1992.