January 2019
Beginner
556 pages
14h 19m
English
Predicates in relational databases use three-valued logic (3VL), where there are three truth values: true, false, and null,. In a relational database, the third value, null, can be interpreted in many ways, such as unknown data, missing data, not applicable, or will be loaded later. The 3VL is used to remove ambiguity. For example, no two null values are equal.
In the next chapter, you will learn how to connect to the database and run queries. Now, I would like to show how a logical OR/AND truth table can be generated by the SQL language:
\pset null nullWITH data (v) as (VALUES (true), (false),(null)) SELECT DISTINCT first.v::TEXT as a, second.v::TEXT ...
Read now
Unlock full access