Database column issue

System Information
  • Strapi Version: 3.6.2
  • Operating System: ubuntu
  • Database: mysql
  • Node Version: 14.x
  • NPM Version: 6.x
  • Yarn Version:

I’ve created a collection named “articles” with title, content at the beginning, afterwards, I added two relational collections named “cat1” and “cat2”, so my table will have title, content, cat1 and cat2, but I didn’t see cat2 in the database, so strange. Does anyone know?

Relation of cat2 is stored in another table which stores the IDs of the relations. That depends on your relationship type. For example, if you use “hasOne”, than you will have a column with the ID of the relation, if you choose “hasMany”, then you will have a separate table which contains all the relations.

N:N same settings for two cat

both: “has many and belongs to”, the same relation.