1, the basic concept of MySQL table
A library is a container for storing tables, a container for storing data.
The table is made up of rows and columns, and in the database, we define the properties of the column. As the number of data increases, "line" continues to increase
Columns are structures, rows are information
2. Why do we use tables to store data?
Table is the important foundation of relational database
The larger the data, the more cumbersome the storage management is, and it's very easy to cause data problems: incomplete, inaccurate, too much redundancy
The relationship between tables in a relational database solves this problem
meet the three paradigms in the design of the table
3. The first paradigm
A field in a database table is a single attribute and cannot be divided
This single attribute is composed of basic types , including shaping, real, character, logical, date, and so on.
Can be divided into sub-points, so far ( each column is an atom )
4. The second paradigm
On the basis of satisfying the first paradigm, the non-critical field in the database table does not have a partial function dependency on any of the candidate key fields (part
A number dependency is the case where some fields in the Combined keyword determine non-critical fields ), i.e. all non-critical fields are completely
Any set of candidate keywords
Each column of data, each tube, does not affect each other, do not put all things into a table, if there is an impact, we need to
Split the rows into other different tables
5. The third paradigm
On the basis of the second paradigm, if there is no non-critical field in the data table, the transfer function dependency on any of the candidate key fields
Transitive function dependencies: that is, if there is a decision relationship of "A, B, C", then the C pass-through function depends on A, that is, the fields in the table and
Primary keys directly correspond to no other intermediate fields
Determines that a field value must be a primary key
determines that some data is a primary key, and then divides the table according to the primary key value (the data of the primary key is not dependent) , which data and primary keys have unique
and close relationships, the data can be isolated
This article is from "The Miracle Teenager" blog, please be sure to keep this source http://raffaelexr.blog.51cto.com/8555551/1733551
The three paradigms of the operation of MySQL tables