Common types:
int integral type
float decimal
Double decimal
varchar (20) string parentheses inside is the length of the write string only the string has parentheses
Bit Boolean type data
DateTime Date-Time type
Text Long
Infrequently used types:
Money Deposit Currency
Image storage Binary Data
Data sheet:
1. Column name Type length
2. Primary key Each table must have a primary key column is not repeatable, is able to uniquely identify a piece of data
3. Type of control column (index): 1. Unique index (cannot be duplicated) 2. Non-empty
4. A foreign key exists in relation to two tables
Relational database: Because there are all these relationships in the database, the database is also called a relational database.
Design of the database:
The three main paradigms of database design:
1. First paradigm: Guaranteeing the atomicity of columns
That is, when the data table is written column is split until it can no longer be removed (relative to the program function).
Like what:
Zhangdian District, Zibo, Shandong Province
Zhangdian District, Zibo, Shandong Province
2. Second paradigm: Each column is related to the primary key
In fact, the time is: Each column is related to the table.
3. The third paradigm: Each column is directly related to the primary key
MySQL Database basics