如何映射新表SQL

时间:2019-03-19 02:22:45

标签: database-design foreign-keys

我有2个表,我想映射到名为bags_user的新表,现在bags_user是空的,所以我想映射到这里。谢谢你的帮助

|id  |1   |
+----+----+
|bags|box |
|size|14' |

用户

|id   |1             |
+-----+--------------+
|name |anna          |
|email|anna@gmail.com|

bags_user (现在此表为空)

|id     | (empty) |
+-------+---------+
|bag_id | (empty) | fk to bags
|user_id| (empty) | fk to user

0 个答案:

没有答案