1.What is DB Design
- Eliminate redundancy of data
- Data reference, related as follows
- ER diagram
- Normal Form Analysis
The relationship between four NF and DB - Table relationship
1:1
1:N / N:1
N:M - Primary Key (Not Null & Unique)
Physical Primary Key
Logical Primary Key - Do not use DELETE CASCADE
2.Forecast the result of SQL
3.DB Efficiency
- Do as many operations in a single table as possible, after reducing the amount of records, connect other tables.
- Some sub queries are slow.
- As for tens of millions of data, index cannot be so quick.