1. Non-null constraints
The ① field cannot be null
②null not equal to ""; Oracle does not allow "" to be written to a non-empty string field
2. Unique constraints
① specifies that data for one or more columns is unique
② A table can have multiple unique constraints
③unique
3. PRIMARY KEY constraints
① to specify a column or columns of the primary key for multiple columns
② primary key columns must have both a non-null constraint and a UNIQUE constraint
③ A table can have only one PRIMARY KEY constraint
④ the role of the PRIMARY KEY constraint: The PRIMARY KEY constraint is able to determine a unique row of data, automatically generate indexes according to the primary key column, improve the efficiency of data retrieval, ensure the uniqueness and standardization of data
How to ⑤ PRIMARY KEY constraints:
A. Unique Code fields
B. Auto-growing integer value field: Oracle is implemented by ordinal column; Other databases have fields that support self-growing types; suitable for single databases; not for distributed databases
C. GUI D globally uniquely identifies: 32-bit-length 16-in-one string; Suitable for distributed database
4. Check constraints
By checking the rule statement: the size of a qualified value; A list of qualified values
5. FOREIGN KEY constraints
Constraint relationships between two tables
Constraints on building tables