For questions about mysql, multi-table query, previously only a single table was used, as shown in the following figure

< H2 > question < / H2 >

usually what connection to choose and what role foreign keys usually play
clipboard.png

clipboard.png

id,


clipboard.png

Mar.12,2021

  1. join is used for querying, foreign key, for table structure, and for a completely different purpose.
  2. using or not using foreign keys has its own advantages. You can choose by yourself. To put it simply, using foreign keys can better maintain data consistency, but lose flexibility.
  3. several types of join can be found in the theoretical books of the database. Lend flowers and present Buddha to a picture:

clipboard.png

Menu