Chapter 2. Set Theory and Predicate Logic

Steve Kass

This chapter contains a brief introduction to two cornerstones of mathematics: set theory and predicate logic, which are intimately connected to the world of databases. Database tables represent sets of facts, and database queries produce result sets based on query predicates.

The objects of study in logic are propositions—statements of fact that are either true or false—and propositional functions, which are open statements with one or more unspecified values. Database tables hold representations of statements of fact, and query predicates are propositional functions.

Later in this book, you’ll use logical set-based thinking to write a T-SQL SELECT query to return the following result set: “all ...

Get Inside Microsoft® SQL Server® 2008: T-SQL Querying now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.