Speaking of software development We can't leave the database alone When it comes to databases There are three paradigms In fact, there are six database paradigms Except first Two Three paradigms

There's a fourth The fifth paradigm and a BC normal form Here we only discuss three paradigms Interested friends can find some professional books for further study

First paradigm (1NF)

The first paradigm is that each column of a database table is an indivisible basic data item Cannot have more than one value in the same column That is, an attribute in an entity cannot have more than one

Value or cannot have duplicate properties

This is the basic concept of the first paradigm What do you mean Let's give you an example There is one in one watch “ Telephone ” field Its value is the existing mobile phone number There's another number that

It doesn 't fit

The requirements of the first paradigm At this time, you should “ Telephone ” Split into “ mobile phone ” Follow “ Landline ” So it becomes a data table that conforms to the first paradigm

summary : Fields cannot be subdivided

Second paradigm (2NF)

The second paradigm is based on the first paradigm That is to say, to satisfy the second paradigm, we must first satisfy the first paradigm The second paradigm requires each of the database tables

Instances or rows must be uniquely distinguishable To achieve differentiation, you usually need to add a column to the table To store the unique identity of each instance

Require that the properties of the entity are completely dependent on the primary key The premise of discussing a table that does not conform to the second normal form is The primary key of this table is a combined primary key If it's not a combo master

That's not consistent with the second paradigm

summary : Not partially dependent , That is, when a table has a combined primary key , Other non primary key fields must be completely dependent on the primary key .

Third paradigm (3NF)

The third paradigm is to conform to the second paradigm The third paradigm is that there cannot be non primary key fields in one data table That is to say, if there are other

The fields in the table must be the primary key of that table

If a watch has a b c Three fields a—>b b—>c that c And a It's a delivery dependency This is not in line with the third paradigm And it doesn't matter a Can you confirm it directly

set c Are all transitive dependencies So only b Follow c Independent of a Any field other than the third normal form

summary : No delivery dependency , That is to say, fields other than the primary key must depend on the primary key Instead of relying on other fields

The above is my superficial understanding of the three paradigms If there is anything wrong, please give me more advice

©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library ) Some East 14 Pay change 16 salary , Sincerity or routine ? Browser kernel ( understand )java Four functional interfaces ( a key , simple )HashMap Explain in detail html Writing about cherry trees , Writing about cherry trees os Simple use of module