The pursuit of theory is frequently perceived as being unnecessary in the day-to-day practice of administering relational database management systems, but a small dose of theory is essential to understanding the issues you encounter when designing and maintaining databases.
Practical relational database management can be formalized using the principles of set theory and formal logic. The correspondence between relational set theory and relational database theory is not always direct. Relational database theory is based on the relations of set theory, but necessarily introduces the following additional constructs:
| Database Relations | Set Theory Relations |
|---|---|
| Typed. Data types, or domains, are also a form of constraint. | Not typed. |
| Not ordered left to right. | Ordered left to right. |
| Dependent on relation variables. | No corresponding theory. Concept of integrity as understood for relational database management is foreign to set theory relations. |
Definitions of Terms
| Term | Definition |
|---|---|
| Assertion | See “Proposition”. |
| Existential quantifier | The symbolic quantifier ∃ of predicate logic, signifying the logically equivalent English language phrases “for some,” “for any,” and “there exists.” |
| Identity predicate | The symbolic operator = of predicate logic, signifying the logically equivalent English language phrases “is identical to” or “is equal to.” |
| Inference rules | The rule set of a formal system that determines the steps of reasoning that are valid for proving logical propositions. |
| Predicate | A truth-valued function. The attributes of a relation (columns) and the relation heading (relation variable) itself, can be represented formally as logical predicates. This is true whether an explicit constraint is defined over the column or not, because when no explicit constraint is defined, the implicit constraint specified by the data type for the column specifies its minimum, essential, constraint. You cannot, for example, insert the character string ‘character string’ into a column typed as INTEGER without first converting the string into an integer value. This type of constraint is known as a domain constraint (see Domain Constraints). |
| Predicate calculus | The set of inference rules by which propositions in predicate logic are proven. |
| Predicate logic | The study of statement validity using the truth-functional operators of the propositional calculus, the universal and existential quantifiers, and the identity predicate. |
| Proposition | An assertion that can be proven unequivocally to be either true or false. In a relational table or relation variable, all rows are assumed to be true propositions by default, because false ones are prevented from entry in the database by the integrity constraints, both implicit and explicit, defined on that database. Each proposition (tuple) in a relation is an instantiation of its relation variable predicate that evaluates to TRUE. This important property is also called the Closed World Assumption. |
| Truth-valued function | A function that evaluates unequivocally to either TRUE or FALSE. |
| Universal quantifier | The symbolic quantifier ∀ of predicate logic, signifying the English language phrase “for all.” |