chapter2
chapter2
with constraints
I N T R O D U C T I O N T O R E L AT I O N A L D ATA B A S E S I N S Q L
Timo Grossenbacher
Data Journalist
Integrity constraints
1. Attribute constraints, e.g. data types on columns (Chapter 2)
2. Key constraints, e.g. primary keys (Chapter 3)
Timo Grossenbacher
Data Journalist
Working with data types
Enforced on columns (i.e. attributes)
Define the so-called "domain" of a column
boolean : can only take three states, e.g. TRUE , FALSE and NULL (unknown)
Timo Grossenbacher
Data Journalist
The not-null constraint
Disallow NULL values in a certain column
Must hold true for the current state
...
NULL != NULL