光阴似箭催人老,日月如移越少年。
When two tables establish a one-to-many relationship, the "one" end is the parent table, and the "many" end is the child table. GeneralSet the primary key in the parent tableSet the foreign key in the child tableAccording to your choice: Method 2
Method 2, but it is not recommended to build foreign keys on the database
Method 1 + Method 2 together, because I want to conveniently query the current version of the file and make data redundant, haha
When two tables establish a one-to-many relationship, the "one" end is the parent table, and the "many" end is the child table.
General
Set the primary key in the parent table
Set the foreign key in the child table
According to your choice: Method 2
Method 2, but it is not recommended to build foreign keys on the database
Method 1 + Method 2 together, because I want to conveniently query the current version of the file and make data redundant, haha