Abstract
The management of uncertain data is a critical challenge in modern database systems. Probabilistic XML (p-XML) provides a robust framework for modeling such uncertainty using tree structures with distributional nodes. However, query evaluation over p-XML is computationally expensive. This paper investigates the use of pre-computed views to optimize query answering. We define the "view rewriting" problem for p-XML and identify the conditions under which it is tractable. By introducing the concept of condition-independence (c-independence), we develop polynomial-time algorithms for rewriting tree-pattern queries using both single and multiple views. Our results establish a tractability frontier and demonstrate significant performance gains over direct evaluation.
Introduction
In modern data management, uncertainty is a pervasive challenge arising from noisy sensor data, imprecise web scraping, or fuzzy schema matching. Probabilistic XML (p-XML) has emerged as a standard model for such data, representing information as a tree where certain "distributional" nodes denote mutually exclusive choices or independent occurrences.
However, querying p-XML is significantly more complex than querying deterministic XML. A common optimization in traditional databases is the use of views: leveraging the stored results of a previous query to answer a new one. In a probabilistic context, this requires not only retrieving the relevant data fragments but also correctly reconstructing their associated probabilities. This paper addresses the fundamental question: Under what conditions can we compute the probability of a query answer using only the information stored in probabilistic views?
Probabilistic XML and Tree-Pattern Queries
The authors focus on Tree-Pattern Queries (TP), a core subset of XPath. A p-document represents a probability distribution over a set of deterministic XML documents. Distributional nodes, such as mux (mutually exclusive) and ind (independent), define the structure of this distribution.
The research explores two primary semantics for query results:
- Copy Semantics (No Persistent IDs): Only data fragments are available. Answering a query requires navigating within a single view, a process known as "compensation."
- Persistent IDs: Nodes can be identified across different views, enabling the intersection of multiple views to derive an answer.
The C-Independence Framework
The core technical contribution is the concept of condition-independence (c-independence). Two queries are considered c-independent if the probability of their joint satisfaction is the product of their individual probabilities, adjusted for the probability of their shared context node.
This framework underpins two primary algorithms:
TPrewrite: A polynomial-time (PTime) algorithm for single-view rewriting. It verifies if a view contains sufficient data and if probabilities can be extracted without hidden dependencies.TPIrewrite: An algorithm for multi-view intersection that decomposes views into independent components and utilizes linear equations to determine the final probability.
Key Insights and Tractability
The study reveals that probabilistic rewriting is fundamentally harder than its deterministic counterpart. Even when the required data is present in a view, the way probabilities are "packed" may prevent their correct extraction. A specific structural challenge identified is the "prefix-suffix" trap: if a view's path ends in a sequence of labels where the beginning matches the end, it can create ambiguities that make probability reconstruction impossible.
The authors identify a "tractability frontier" within "extended skeletons"—a fragment of XPath where descendant axes are restricted in predicates. In this space, multi-view rewriting remains efficient.
Results and Conclusion
The paper establishes several key results:
- Single-View Rewriting: A sound and complete PTime decision procedure is provided.
- Multi-View Rewriting: While generally coNP-hard, the authors provide a sound PTime algorithm for practical cases like extended skeletons.
- Efficiency: Evaluating queries via view rewriting is shown to be at least as efficient as direct evaluation over the original p-document, and often significantly faster.
While the algorithms are polynomial relative to data size, they remain exponential relative to query size—a theoretical limit that is rarely reached in practice. Future work involves exploring "why-provenance" to further optimize view selection and extending these techniques to broader probabilistic models.
Summary updated