The closed-world assumption (CWA) is a logical principle where any statement not explicitly known to be true within a given system is assumed to be false. This is the default mode of operation for traditional databases and many programming languages, where the system's knowledge is treated as complete. Under CWA, if a fact like "Employee X works in Department Y" is not present in the database, the system concludes it is false. This contrasts directly with the open-world assumption (OWA) used in formal ontologies and semantic reasoning.
Glossary
Closed-World Assumption

What is the Closed-World Assumption?
A foundational logical principle contrasting with the open-world assumption in knowledge representation.
In enterprise knowledge graphs and ontology engineering, understanding this distinction is critical for data modeling and query semantics. A SPARQL query over an RDF graph using OWA will not infer falsity from absence, while a SQL query on a relational database under CWA will. This assumption directly impacts entity resolution, knowledge graph completion, and the design of semantic reasoning engines, as it defines the boundaries of what the system can definitively assert versus what remains unknown.
Key Characteristics of the Closed-World Assumption
The closed-world assumption (CWA) is a foundational principle in database systems and logic programming where any statement not explicitly known to be true is assumed to be false. This contrasts with the open-world assumption prevalent in semantic web and ontology engineering.
Core Logical Principle
The closed-world assumption operates on the principle of negation as failure. If a fact cannot be proven true from the available knowledge base, it is concluded to be false. This is formalized in logic programming (e.g., Prolog) and is the default mode for relational database queries, where a missing record implies the non-existence of that entity-property relationship.
- Mechanism: A query returns
falseor an empty set if a matching fact is not found. - Contrast: Differs fundamentally from the open-world assumption, where a missing fact simply means the system lacks knowledge about its truth value.
Primary Domain: Databases
The CWA is the default operational mode for relational database management systems (RDBMS). The database schema defines a complete universe of discourse; any data not present in the tables is considered non-existent.
- SQL Queries: A
SELECTstatement that returns no rows is interpreted as "no such records exist." - Integrity Constraints: Mechanisms like foreign keys and
NOT NULLenforce a closed world by defining what must be present and what relationships must hold. - Practical Implication: Enables efficient querying and transaction processing by relying on the completeness of the stored data.
Contrast with Open-World Assumption
This is the most critical distinction in knowledge representation. The open-world assumption (OWA), used in ontologies (OWL) and the semantic web, treats the knowledge base as incomplete. The absence of a fact does not imply its falsehood; it may be true, false, or simply unknown.
- OWA Example: An ontology may state
Person(Alice). Without ahasSiblingassertion, the system cannot conclude Alice has no siblings. A reasoner remains agnostic. - CWA Example: A database table
Employeeswith no record forBobauthoritatively means Bob is not an employee. - Interoperability Challenge: Integrating closed-world data (databases) with open-world knowledge (ontologies) is a central challenge in Ontology-Based Data Access (OBDA).
Implications for Query Answering
Under the CWA, query answers are deterministic and complete based on the stored data. This leads to two key behaviors:
- Complete Knowledge: The system can definitively answer both positive queries ("Is X true?") and negative queries ("Is X false?").
- Monotonic vs. Non-Monotonic Reasoning: CWA enables non-monotonic reasoning. Adding a new fact to the knowledge base can invalidate previous negative conclusions. For example, learning a new fact can change an answer from
falsetotrue. This contrasts with monotonic reasoning under OWA, where adding facts only increases knowledge without retracting previous conclusions.
Use in Logic Programming
The CWA is formally implemented in logic programming languages like Prolog. The semantics are defined such that a goal is considered false if it cannot be proven true through the application of rules and facts in the program.
- Negation as Failure: The operator
\+("not provable") explicitly embodies the CWA.\+ goalsucceeds ifgoalcannot be proven. - Stable Model Semantics: More advanced formalisms like Answer Set Programming (ASP) extend the CWA to provide declarative semantics for complex reasoning with defaults and constraints.
Limitations and Risks
While efficient, the CWA carries significant risks if applied to inherently incomplete knowledge, leading to erroneous conclusions.
- Risk of False Negatives: If the knowledge base is incomplete (e.g., a customer database missing recent entries), the system will incorrectly assert the non-existence of those customers.
- Unsuitability for Integration: In semantic data integration or when working with federated, evolving data sources, the OWA is typically more appropriate to avoid premature, incorrect closures of the world.
- Design Requirement: Applying CWA requires high confidence in the completeness and authority of the data source for the queries being executed.
Closed-World vs. Open-World Assumption
A comparison of the two foundational logical assumptions governing truth, knowledge, and query answering in data systems.
| Feature / Dimension | Closed-World Assumption (CWA) | Open-World Assumption (OWA) |
|---|---|---|
Core Logical Principle | Any statement not known to be true is assumed to be false. | The absence of information (a fact not being known) is not evidence of its falsehood. |
Primary System Archetype | Traditional relational databases and business rule engines. | Ontology-based systems, knowledge graphs, and the Semantic Web. |
Query Answer for Unknown Facts | Returns 'false' or an empty result set. | Returns 'unknown' (or a distinct 'no information' state). |
Completeness Assumption | Assumes the system's knowledge base is complete for its domain. | Acknowledges the system's knowledge base is inherently incomplete. |
Impact on Inference & Reasoning | Enables monotonic reasoning; new facts cannot invalidate previous conclusions derived from absence. | Enables non-monotonic reasoning; new facts can overturn previous assumptions of falsehood. |
Default Negation Support | Supports negation as failure (e.g., SQL NOT EXISTS). | Requires explicit negative assertions or use of a closed-world sub-query. |
Typical Use Case | Enterprise transaction processing, reporting on known records. | Knowledge discovery, data integration from heterogeneous sources, scientific hypothesis. |
Formal Logic Basis | Often aligned with database logic and Prolog under certain semantics. | Based on First-Order Logic and Description Logics (the foundation of OWL). |
Systems Using the Closed-World Assumption
The closed-world assumption is a foundational principle for systems that require complete, non-ambiguous answers from a finite, known dataset. It underpins the deterministic behavior of traditional databases and many rule-based expert systems.
Relational Database Management Systems (RDBMS)
Relational databases are the canonical example of closed-world systems. A query like SELECT * FROM Employees WHERE Department = 'Sales' returns only the records explicitly stored in the Employees table. Any employee not in the result set is assumed not to work in Sales. This is enforced through:
- Integrity Constraints: Primary and foreign keys define a complete, consistent universe of valid data.
- ACID Transactions: Guarantee that the database moves from one complete, consistent state to another.
- Null Values: Represent the explicit absence of known information within the closed world.
Structured Query Language (SQL)
The SQL language is designed for closed-world querying. Key operations rely on the assumption that the database contains all relevant facts.
- NOT EXISTS / NOT IN Clauses: These constructs explicitly leverage the closed-world assumption to find absences.
- Closed-World Query Semantics: The result of any
SELECTstatement is a definitive answer set from the known data. If a fact isn't derivable from the stored tables and joins, it is considered false for the purpose of the query. - Three-Valued Logic: SQL's handling of
NULL(unknown) is a pragmatic extension, but query results themselves are a closed set of known-true tuples.
Datalog & Logic Programming
Datalog, a declarative logic programming language, typically operates under the closed-world assumption via negation as failure. If a fact cannot be proven from the given rules and base facts, it is assumed false. This is critical for:
- Deductive Databases: Extending RDBMS with recursive rules, while maintaining complete answer sets.
- Business Rule Engines: Executing policy rules (e.g., "approve loan if income > X and no default exists") where the absence of a default record is a conclusive negative. Contrast with Prolog, which often uses an open-world, proof-based model.
Rule-Based Expert Systems
Classic expert systems like MYCIN or business rule management systems (BRMS) use a production rule engine working on a working memory of facts. This memory represents the complete known state of the world for the session.
- Forward/Backward Chaining: Inference engines apply
IF-THENrules only to known facts in working memory. The inability to match a rule's antecedent is treated as the antecedent being false. - Certainty Factors: While they may handle uncertainty, the core reasoning operates over a closed set of asserted evidence. This allows for deterministic diagnosis or decision-making based on a finite knowledge base.
Closed-World Machine Learning
Certain machine learning paradigms implicitly adopt a closed-world view during training and inference.
- Multi-class Classification: A model trained to distinguish between, e.g., 10 animal classes will assign any input to one of those 10. An image of a novel, unseen animal is forced into one of the known categories—a closed-world decision.
- Anomaly Detection: Models are trained on "normal" data; anything sufficiently different is flagged as an anomaly, effectively defining a closed world of normality.
- Knowledge Graph Completion: Link prediction models infer missing triples within the known set of entities and relation types, assuming the graph's schema defines the universe.
Enterprise Application Integration (EAPI)
Systems that synchronize data between applications (e.g., CRM to ERP) often use a closed-world reconciliation logic.
- Master Data Management (MDM): A golden record is constructed from known source systems. If a system does not report a value for an attribute, the MDM process may treat it as non-applicable or use a default, rather than preserving an "unknown."
- Change Data Capture (CDC): Propagates updates as definitive new states, overwriting previous values. The target system's state after sync is treated as the complete and current truth. This ensures deterministic, actionable data flows across business systems.
Frequently Asked Questions
The closed-world assumption is a foundational logical principle in data management that defines how systems interpret missing information. This FAQ clarifies its technical mechanisms, contrasts it with the open-world assumption of ontologies, and explains its critical role in enterprise knowledge graph design.
The closed-world assumption is a logical principle used in database systems and classical logic programming where any statement not explicitly known to be true within the system is assumed to be false. This creates a 'closed' universe of discourse where the knowledge base is treated as complete for its defined domain.
In practical terms, if a fact is not present in the database, the system concludes it is false. This is the default mode of operation for SQL databases and systems like Datalog. For example, if a customer database contains no record of a transaction for Customer_ID=456, a query system operating under the closed-world assumption will return that the transaction did not occur, rather than returning 'unknown'.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The closed-world assumption is a foundational principle in data management and logic. Understanding its logical counterparts and related modeling concepts is essential for designing robust knowledge systems.
Negation as Failure
Negation as failure is a rule of inference in logic programming (e.g., Prolog) where a proposition is assumed to be false if it cannot be proven to be true, given the available knowledge and rules. It is a procedural implementation of the closed-world assumption.
- Operationalization of CWA: It explicitly codifies the CWA within a program's execution model. The query
not(p)succeeds ifpfails to be proven. - Scope: Applies within the context of a specific program or database. It does not make a claim about the universal truth of
p, only about its derivability from the given rules. - Use Case: Common in database query languages (e.g., SQL's
NOT EXISTS) and declarative business rules for checking absence.
Unique Name Assumption (UNA)
The unique name assumption is a simplifying principle where different names (identifiers) are assumed to refer to different entities in the world. It is often adopted alongside the closed-world assumption in database systems.
- Database Default: In a SQL database, two rows with different primary keys are assumed to be different entities.
- Contrast with OWA/OWL: Standard OWL does not make the UNA. Two different URIs (e.g.,
:id_123and:employee_456) could, in principle, refer to the same individual unless explicitly declared otherwise withowl:differentFrom. - Impact on Integration: Relaxing the UNA is necessary for entity resolution and linking data from multiple sources where the same entity may have different identifiers.
Domain Closure Assumption
The domain closure assumption is a stronger form of the closed-world assumption which asserts that the set of individuals in the knowledge base is all the individuals that exist in the domain of discourse. There are no other individuals.
- Complete Enumeration: It assumes the knowledge base contains a complete list of all relevant entities. For example, if the KB lists Alice, Bob, and Charlie as Employees, then there are exactly three employees.
- Formal Logic: Often expressed in logic by adding axioms that state the known individuals are the only ones. This enables stronger forms of reasoning, like reasoning by cases.
- Application: Useful in constrained, well-defined domains (e.g., configuring a specific piece of hardware with known components) but unrealistic for open domains like general web data.
Default Logic
Default logic is a non-monotonic logic formalism that allows reasoning with default assumptions—conclusions that hold in the absence of contradictory information. It provides a formal framework for concepts like the closed-world assumption.
- Non-Monotonicity: Adding new facts can invalidate previous conclusions (unlike classical monotonic logic). This mirrors how a database update can change the result of a negation-as-failure query.
- Default Rules: Expressed as
A : B / C, meaning: if A is believed, and B is consistent with our beliefs, then conclude C. For example, "If X is a bird, and it is consistent that X can fly, then conclude X can fly." - CWA as a Default: The CWA for a predicate P can be modeled as a default rule:
true : ¬P(x) / ¬P(x), meaning: for any x, if it's consistent to assume ¬P(x), then assume it.
Completion (in Databases & Logic)
Completion is the process of transforming a set of facts and rules into a logical theory that explicitly includes the negations of all facts not entailed by the program, thereby enforcing the closed-world assumption at a semantic level.
- Clark's Completion: A formal method for assigning semantics to logic programs with negation. It transforms a program like
P(a). P(b).into statements meaning "P(x) is true if and only if x is equal to a or x is equal to b." This logically implies¬P(c)for any other constant c. - Link to CWA: The completion of a database or program is a logical formula whose models correspond exactly to the intended meaning under the CWA.
- Role in Query Answering: Query engines for deductive databases often use completion semantics to evaluate queries involving negation correctly and efficiently.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us