About the understanding of the three paradigms database

At the outset, I answer this is a personal summary of the work, not suitable for the examination answer expensive .

Welcome to my blog attention .

Preface: Database Design fact, not only restricted to three paradigms, down fact, there are many, but for most people, you have to engage in scientific research, not made aircraft and artillery, to master the three major paradigms at work have been sufficient a.

The idea: What database have? To put it plainly is not a database inside a relational data tables do? Just between the table and the table by foreign keys associated with the primary only. So, you took a picture of him understood as information, a data deposit with the only clue to find another data, this trail is the relationship.

Following entered, that is, play:

1NF: atomic columns, each column is not sub-divided. For example, it is either male or female gender, this is called no longer divided, but the address does not work, you can not put together a series of written address to the floor or the building is divided into provinces, cities, counties, county or something.

This is the first paradigm, not too much to ask why, just like you want to charge money to buy the same skin, you can ask people free of charge to you? This is the iron law.

2NF: There are key points of the primary and the secondary key, the sub-key entirely dependent on the primary key, the primary key is a unique identifier, representing the object, while the other sub-keys are used to describe the object. Find the overall message of this object by primary key.

3NF: In fact, this work for a long time will naturally understand. Elimination of transitive dependencies, it means there is a relationship between the vice key, it is best to build a separate table. This is not so much the redundant data.

To say the home has style, you have to score the whole style, the style rating or something, plus you have a table to describe the style. A table corresponds to a class. A is A, B is B, C is C.

There is the presence of 1 to many, many to many relationship when the table should be divided, or else the data redundancy will be particularly large. 100 data and almost 100 million the amount of data on the gg.

Three paradigms nothing, so the design is better, make your data more layering. With disk partitions is a reason.

 

Note: The above is for reference, personal development summary. I hope for your help, let us make progress.
Practice makes no before, and if wrong questions please leave a message.

 

Guess you like

Origin www.cnblogs.com/onthewaytogrowth/p/11222084.html