In this lesson, you will learn why databases treat missing information as "false" rather than "unknown."
The Logic of Limitation
Up until now, we have treated our database tables as complete records of our business world. When we ask a question of our data, we assume that the database knows everything there is to know about the entities we have defined. This is known as the Closed World Assumption.
In a "Closed World," if a fact is not explicitly stored in your tables, the database assumes that the fact is false. It doesn't assume that the information is missing or that it might be true elsewhere; it assumes that if it isn't in the database, it simply does not exist.
A Concrete Example
Imagine you have a table called RegisteredStudents that tracks who is attending a specific seminar:
| StudentID | Name |
|---|---|
| 101 | Alice |
| 102 | Bob |
If you run a query asking if "Charlie" is registered, the database looks through the table and finds no row for Charlie. Under the Closed World Assumption, the database concludes: "Charlie is not registered."
It does not think, "Perhaps I don't have enough information to know if Charlie is registered." It acts on the certainty that if he were registered, he would have a row in that table. By keeping our world "closed," we allow the database to provide definite, reliable answers based strictly on the facts we have provided.
This approach is vital for database design because it prevents ambiguity. If the system were allowed to assume that missing data might be "true but hidden," our queries would become unreliable and our constraints—like the Primary Keys we discussed earlier—would be impossible to enforce. We define the boundaries of the database, and the database operates only within those boundaries.
Key Takeaway: The Closed World Assumption means that a database considers any information absent from its tables to be false, ensuring that query results remain definitive rather than speculative.