Verifying Integrity Constraints on Web Sites

Mary F. Fernández, Daniela Florescu, Alon Y. Levy, Dan SuciuIJCAI 1999

Introduction

In the late 1990s, Web sites transitioned from simple hand-coded HTML pages to "data-intensive" sites that integrated information from various databases. Managing these sites manually presented significant challenges: changes to the underlying database schema could accidentally break links or hide critical information. This paper addresses the challenge of maintaining Integrity Constraints—structural properties such as reachability (ensuring every page is accessible from the root), consistency (linking related articles), and security (preventing accidental exposure of proprietary data).

Crucially, the authors argue for verifying the site definition (the code/rules that generate the site) rather than a specific site instance (the actual HTML files). Since modern sites are often generated on the fly, checking every possible page combination manually is impossible.

Methodology: Declarative Web Management

The authors leverage a "declarative" approach to Web management, specifically citing the Strudel system. Their method involves three main components:

  1. Site Definition Language: A Web site is modeled as a graph where nodes (pages) and edges (links) are defined using Horn rules (a subset of first-order logic).
  2. Constraint Language: Regular-path expressions are used to define constraints, allowing designers to specify required paths between nodes (e.g., "there should be a path of type a.b*.c").
  3. The Verification Algorithm: This core technical contribution translates both the site definition and the integrity constraints into Datalog programs.
Schematic of a site definition showing logical relationships between page types.

The problem of "Does this site satisfy this constraint?" is transformed into a Query Containment problem: determining if the set of results from a "violation query" is always empty given the "site definition query." If a violation is possible, the algorithm performs a search to suggest "fixes," such as adding a missing link or narrowing a rule's conditions.

Illustrative Case Study

The paper demonstrates the framework using a small, illustrative example of a research publication Web site containing entities like Person, Article, and YearPage. This example serves to show how the Horn rules generate the site graph and how constraints—such as reaching an article's PostScript source—are verified.

An example site graph instance generated from the site definition.

By abstracting a Web site into a labeled directed graph, the authors apply decades of graph theory and database research (specifically Datalog and query containment) to the medium of the Web.

Key Insights and Results

The primary innovation is the shift from extensional verification (checking the site after it is built) to intentional verification (checking the logic used to build it). This guarantees the site remains valid even as the underlying database content changes daily.

Key results include:

  • Soundness and Completeness: The algorithm is guaranteed to find a violation if one exists and will not report "false positives" for certain classes of constraints.
  • Complexity Bounds: For site definitions without cycles, the verification problem is NP-complete. While theoretically daunting, the "size" here is the site definition (usually hundreds of lines), not the database (millions of records), making it computationally feasible for real-world use.
  • Automated Repair: Because the algorithm uses symbolic reasoning, it can pinpoint exactly which rule in the site definition allows a constraint to be violated and suggest the minimal change needed to fix it.

Limitations and Future Work

While the algorithm handles many cases, general recursive Datalog is undecidable. The authors focus on "non-recursive" or specific restricted versions to maintain functionality. Furthermore, the method assumes the site is built using a declarative management system; it cannot easily be applied to "spaghetti code" sites without first extracting a formal model.

The authors suggest that this verification is the first step toward adaptive Web sites—sites that can automatically restructure themselves based on user behavior while guaranteeing they never break their own internal logic.

Summary updated

BibTeX
@inproceedings{fernandez1999verifying,
  author = {Mary F. Fernández and Daniela Florescu and Alon Y. Levy and Dan Suciu},
  title = {{Verifying Integrity Constraints on Web Sites}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1999},
}
Figure