Reprint Source:
Http://www.doc88.com/p-538467175318.html
1. Primary key
(1) Meaning: can determine the unique identification of a record.
(2) Primary key design principle: The primary key should be non-meaningful to the user; The primary key should be single-column, improve the efficiency of connection and filtering; The primary key should not be updated; The primary key should not contain dynamically changing data such as timestamps, create/Modify time columns, or primary keys should be generated automatically.
(3) View mode: Use Navicat Premium Connection database, select the table, right--design table, select Indexes, there is a unique identity is the primary key.
2. Foreign key
Used to associate with another table. If column A is a column of table 1 and is the primary key of table 2, then column A is the foreign key of table 1.
3. Index
SQL (iii)-PRIMARY key, foreign key, and index