LAMP linux Apache MySQL PHP relational Server Software "server" database operation
MySQL common data type: int varchar float DOUBLE bit datetime ...
varchar specified length, no matter how long the content is, the actual length is less than or equal to the specified length
char specifies the length, regardless of the length of the content, which is the specified length
General experience in building a table: classification, layering, step-by
1. Classification
2, MN Relationship: A pair of one or one-to-many, many-to-many
Primary key, foreign key.
I. Entity integrity:
Primary key: Unique, required, sorted; Only one primary key per table. Single column, combined columns.
Self-growth: must be a number, the system automatically increases.
Default value: If you do not fill in the default values are populated, if filled with the filled values are saved.
Non-null constraint:
Second, quote the full
Foreign keys: Two tables (Main table, from table), built on the table.
Main Table: A table used to constrain others
From tables: constrained tables.
The Master-slave table is only meaningful for the specified two tables
MySQL Database First day