Should junction tables have more than one primary keys from another identifying table?

后端 未结 4 620
野趣味
野趣味 2021-01-16 04:43

Here\'s an example: Originally I have 3 tables. Table B references Table A. So now Table B has two primary keys. One used as the original primary key and the other one to en

4条回答
  •  被撕碎了的回忆
    2021-01-16 05:26

    From your edited post - the only way to do this correctly is to have another table to hold the many to many relationship. Sniipit & snippit_topic have single primary keys and this new table has two columns with each of the primary keys

提交回复
热议问题