Imagine you are managing a database for a hospital. You want to enforce a simple rule: Every patient record must include a date of birth. If an administrator tries to save a patient record without a birthdate, a traditional relational database will immediately reject it, throwing an error.
Now imagine you are using the Web Ontology Language (OWL) to manage this same data. If you add a patient record without a birthdate, the system will happily accept it. Instead of flagging an error, the system simply infers that the patient does have a birthdate, but it is currently unknown.
This contrast highlights a fundamental logical conflict at the heart of data management: the mismatch between the Closed World Assumption (CWA) of databases and the Open World Assumption (OWA) of the Semantic Web. While databases assume that any information not explicitly recorded is false or invalid, ontologies assume that missing information is merely unobserved. This article explores why this conflict occurs and how researchers have engineered mechanisms to bridge the gap, allowing for strict data validation within open-world systems.
The Core Friction: Deductive Rules vs. Integrity Constraints
To understand why this mismatch happens, we have to look at how these two paradigms interpret rules. As Motik et al. explain, database schemas function as integrity constraints—they act as gatekeepers that validate data and reject anything that violates the structure. Conversely, ontology axioms act as deductive rules—they assume the data is correct and dynamically fill in the gaps via automated reasoning.
Consider what happens when you define a mandatory attribute, such as requiring every biological sample to have a source organism. In an open-world logic framework, an incomplete record does not trigger a validation error. Instead, the logic engine generates an anonymous, existential entity to satisfy the rule. As Ruttenberg et al. observe in the context of biological pathway data, this makes it impossible to detect incomplete records during data exchange; the system interprets a lack of data as a lack of knowledge rather than a structural failure.
This behavior creates a severe practical bottleneck. In industrial manufacturing (Kharlamov et al.), geospatial data integration (Huang et al.), and enterprise data modeling (Moxon et al.; Scherp et al.), engineers need to ensure data completeness. When an open-world system simply "invents" facts to satisfy its rules instead of throwing an error, standard data validation breaks down (Cuenca Grau et al.).
Shifting the Perspective from Truth to Knowledge
To fix this, researchers had to change the underlying question the system asks. Instead of evaluating whether a constraint is true in all possible worlds, the system must evaluate what it actually knows right now.
Epistemic Integrity Constraints
One elegant solution is to introduce epistemic logic. Console et al. formalize this by shifting the focus to the system's state of knowledge. Instead of checking if a relationship exists somewhere in an idealized open world, an epistemic constraint checks if the relationship is known to the system. If the system cannot explicitly verify the data from its current knowledge base, the constraint is violated, and an error is triggered.
Closed-World Semantics for Constraints
Another approach is to overlay a separate semantic layer specifically for constraint checking. Tao et al. propose an integrity constraint semantics for OWL that evaluates rules from a closed-world perspective. Under this framework, a constraint is satisfied only if the required information is explicitly present or can be explicitly derived from the existing data. It prevents the reasoner from assuming that missing data might exist externally.
Remarkably, you do not always need an entirely new language to achieve this. Peter F. Patel-Schneider demonstrated that standard Description Logics—the mathematical foundation of OWL—can perform closed-world data validation directly. By treating an RDF graph as a complete, closed description of the world during the validation phase, standard logical axioms can replicate the behavior of specialized constraint languages like SHACL or ShEx.
Querying and Integrating Across Worlds
The open-vs-closed conflict does not just affect data validation; it also complicates Ontology-Based Data Access (OBDA), where an open-world ontology serves as a conceptual lens for querying closed-world relational databases.
When aligning these systems, a fundamental impedance mismatch occurs: the database assumes anything unstated is false, while the ontology assumes it might be true (Pinkel et al.; Lutz et al.).
┌────────────────────────────────────────────────────────┐
│ Ontology Layer (Open World) │
│ Missing data = "Unknown" (Infers missing facts) │
└───────────────────────────┬────────────────────────────┘
│
▲ │ Query Rewriting /
Implied │ │ Constraint Translation
Inferences │ ▼
│
┌───────────────────────────┴────────────────────────────┐
│ Database Layer (Closed World) │
│ Missing data = "False" (Strict Schema Constraints) │
└────────────────────────────────────────────────────────┘
To allow standard database engines to execute open-world queries efficiently, researchers developed several bridging mechanisms:
- DBoxes: Seylan et al. introduced the concept of a "DBox" (Database Box). A DBox isolates specific predicates within an ontology and explicitly marks them as subject to closed-world semantics. This allows a reasoner to treat those specific tables as complete, making it possible to rewrite complex ontological queries into standard, highly efficient SQL expressions.
- Combined Query Rewriting: For lightweight ontology profiles like $\mathcal{EL}$, Lutz et al. designed a hybrid approach. By performing a one-time preprocessing step on the database data and rewriting incoming conjunctive queries, they allow off-the-shelf relational database engines to compute open-world logical inferences without requiring infinite data generation.
- Constraint Rewriting: When validating data using a closed-world language like SHACL over a knowledge base that includes an ontology, a unique problem arises: the ontology might imply facts that are valid but not explicitly written down in the database. To prevent the validator from throwing false errors, Kharlamov et al. developed a method to rewrite SHACL constraints so that they automatically incorporate the background knowledge of the ontology during validation.
Alternatively, instead of forcing a closed-world schema onto an open world, some systems embrace the ambiguity. Galárraga et al. introduced "completeness oracles" that use the semantic hierarchies of an ontology to predict which parts of a knowledge graph are likely finished and where facts are genuinely missing, turning the open-world assumption from a validation hurdle into a predictive tool.
Key Foundational Work
What BioPAX Communicates and how to extend OWL to help it (2006) — contributed 4 concept elements to this direction.
Bridging the gap between OWL and relational databases (2007) — contributed 1 concept elements to this direction.
Adding Integrity Constraints to OWL (2007) — contributed 1 concept elements to this direction.