Address: https://www.bilibili.com/video/av39807944/?p=16
1-15: Da environment, build tables, the data type ( https://www.runoob.com/sql/sql-datatypes-general.html ), CRUD, constraint (primary key constraint, increment constraints, the only constraint, non-empty constraint, default constraint, foreign key constraints)
Primary key constraints and unique constraints of difference:
Same table can have only one primary key, but it can have a plurality of unique constraints;
primary key field value is not NULL, the only constraint field value can be NULL;
primary key fields can be used as a foreign key in another table, not only constraint field as other foreign key table;
SQLServer default primary key field create a clustered index, non-clustered index to create a unique constraint field;
16-18 Data table design three paradigms
First Normal Form 1NF
All fields in the data table values are indivisible atomic fraction
Paradigm flexible application. Adjusted according to the actual situation, the split information.
Second Normal Form 2NF
Must be satisfied on the premise of the first paradigm, the second paradigm required, in addition to each column of the primary key must be entirely dependent on the primary key
If we are not entirely dependent appears, it may only occur in the case of joint primary key.
Third Normal Form 3NF
Must satisfy the second paradigm, there can be inter dependence between the transfer opening other columns of the primary key column.