Please enable JavaScript.
Coggle requires JavaScript to display documents.
DATABASE CONSTRAINT - Coggle Diagram
DATABASE CONSTRAINT
Constraints
CHECK
Specification
Primary Key
Constraint
UNIQUE
Constraint
Foreign Key
Constraint
Not NULL
Constraint
a number of features intended to assist
in maintaining the data integrity of the database
REFERENCES Clause
SET DEFAULT option
changes the values
to the default value
NO ACTION option
nothing is changed in the
referencing table
SET NULL option
changes the values
to a NULL
the two database events are updates and deletes
CASCADE option
changes the values
to the new value in the referenced table
NOT NULL Constraint
forbids the use of NULLs in a column
in math calculations - NULL
in logical expressions - UNKNOWN
CHECK Constraint
tests the rows
accepts TRUE or UNKNOWN
rejects FALSE
What Is Integrity?
the correctness and consistency of the
data stored in the database
Consistency
Referential integrity
the data of one table
does not contradict the
data of another table
Entity integrity
each row of a table has
a unique and non-nullprimary
key value
UNIQUE Constraint
no duplicate values in column
can have a NULL
PRIMARY KEY Constraint
only one per table
have a NOT
NULL constraint