24 December 2020

Data Integrity

  • Primary key 

    • The primary key column cannot contain a null or empty value.
    • The primary key column value must be unique.
    • Each table can have only one primary key.

  • Foreign key

    • Referential integrity Constraint.
    • In the parent-child relationship, the parent table keep the initial column values, and the child table's column values reference the parent column values.
    • We have five different referential options - SET DEFAULT, SET NULL, CASCADE, NO ACTION, RESTRICT.
    • CHECK constraint – add logic to check value based on a Boolean expression.

  • UNIQUE constraint – make sure that values in a column or a group of columns unique across the table.
  • NOT NULL constraint – ensure values in a column are not NULL.
  • Explicit Locks, Advisory Locks

No comments:

Post a Comment

Most views on this month