The Relational Database Model and Predicate Logic
After a couple of months of working with MySQL Databases and cowardishly ignoring the fact that I did not have a clue why table-based databases are called "relational", I finally gave in and heroically opened the Wikipedia entry "Relational database". It turns out that the explanation of the name is actually quite interesting - if you are insane. Anyways, here we go. The relational model for databases is a predicate logic. But what is predicate logic again? Predicate logic / first order logic is a collection of formal systems with certain allowed features. And the relational model is such a formal system. So what are the rules of predicate logic and what does a database with a table have to do with it? First, let me introduce some logics terms: Proposition: formally, a function from the set of possible worlds to {True, False}. Eg. "The sky is yellow" - true in one world, false in another. Formula: well-formed set of symbols (eg. `x \Rightarrow (y \wed...