“Everything should be made as simple as possible, but not simpler” – Albert Einstein
The first chapter of Applied Mathematics for Database Professionals is on logic. This chapter is actually available to download from Apress as a free sample chapter. I think this is one of the harder chapters in part 1: the mathematics, so if you can understand this one, I think you’ll be fine with this book. I studied logic in a pure mathematics course in first year at University, and a lot of these terms rung some bells. But this was nearly 2 decades ago, so those bells were quite distant and ringing quite softly.
I also really like how each chapter starts with a page outlining what is going to be covered within the chapter, and each chapter finishes with a series of bullet points highlighting the key features that were covered. This technique really adds to the pedagogic nature of the book.
Chapter 1 begins with a brief introduction to Logic, which obviously goes way back to Ancient Greece. Explains that the relational model is based on logic and that:
“one of the goals of the book is to explain the mathematical concepts on which relational data management is based”
Some definitions of values, variables and types.
A value is a constant, cannot be changed.
A variable is a holder for a value, variables can change over time.
variables (and values) are always of a particular type. A type is the set of values from which a variable is allowed to hold its values, e.g. integers, characters, etc.
Discussion of propositional logic. A proposition is a declarative statement that is either TRUE or FALSE. Examples of things that are not propositions, including equations that can be true or false depending on the values of the variables.
Found the discussion on predicate logic quite hard going, states that a predicate is something having the form of a declarative statement that has variables that once the values of which are known turns the statement into a proposition. Essentially a predicate only can be evaluated (as TRUE or FALSE) when it is invoked with a set of parameters.
Logical connectives (operators) are introduced, they take one or more predicate and return another predicate. Predicates without connectives are known as simple predicates, while those with connectives are compound predicates. The logical operators have precendence rules.
The going got a bit easier with the discussion of truth tables.
Finishes with discussion of logical equivalence and rewrite rules, and I’m afraid the going gets hard again. A rewrite rule allows a proposition in one form to be replaced by another proposition such that is has the same truth values. Includes a discussion on De Morgans Laws.
This becomes mathematically challenging very quickly, and while this chapter felt very far removed from my life as a database professional, I’ve had a sneak peak at chapter 2 and that seems more familiar, so I’m going to carry on with thisl.