Current location - Education and Training Encyclopedia - Graduation thesis - Briefly describe three paradigms and five constraints of database.
Briefly describe three paradigms and five constraints of database.
The explanation in the paradigm book is too awkward. Summarize yourself:

First normal form: Each column (field) in the data table must be the smallest unit that cannot be split, and no hidden fields are allowed. Attributes remain "atomicity" (the largest subdivided two-dimensional table).

The second paradigm: there must be a primary key on the basis of first normal form, and all columns must depend on the primary key, but no column has nothing to do with the primary key, that is, a table only describes one thing (this row is equivalent to explaining a person, and one column cannot be added to explain the weather).

The third normal form: satisfies the second normal form, and each column in the table is only directly related to the primary key, not indirectly related (each column in the table can only rely on the primary key).

Normalized Normal Form (BCDF): Determinants in all tables must be candidate keys. If there is only one candidate key, it is the same as the third normal form.

There is also the fourth and fifth paradigm. The higher paradigm is to solve the problem of data redundancy, but it can also be realized in other ways. So it is generally not needed.

Five major constraints:

1. Primary key: set primary key constraint;

2. Uniqueness: set uniqueness constraint, and there cannot be duplicate values;

3. Default value constraint, Height Double (3 3,2) default1.2 height; If it is not entered, it defaults to 1, 2.

4. Non-empty: set a non-empty constraint; this field cannot be empty;

5. Foreign key: set foreign key constraints.