1, in the database design often use the foreign key, beginners often confuse, according to my experience summed up a bit.
Main Table: A table is created in the database, where the primary key (primary key) is used to correlate with other tables and is identified as uniqueness in the primary table. (Excerpt from Baidu Encyclopedia)
from table: A table with the primary key (primary key) value of the main table as a foreign key (Foreign key), you can associate the query with the primary table by a foreign key. The query is associated with a foreign key from the table and the primary table. (Excerpt from Baidu Encyclopedia)
650) this.width=650; "Src=" https://imgsa.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign= 05e8a682013b5bb5aada28ac57babe5c/c83d70cf3bc79f3dd5004319b8a1cd11728b2931.jpg "alt=" c83d70cf3bc79f3dd5004319b8a1cd11728b2931 "/>
As shown in the previous figure, the table above is a child table , and the following is the Main table .
It is easy to understand that the primary key of the primary table is used as a foreign key, which is placed from the table as a foreign key.
Distinguish between the primary table and the table from the relational row database