[英]Should there be data in a relationship table(Many-to-Many) or should it be in a separate table?
Should data be separated from a relationship table. 应将数据与关系表分开。
Or should data be within the relationship table? 还是数据应该在关系表中?
Small side question: If there will only ever be 1 user per stock
. 小问题:如果1 user per stock
只会有1 user per stock
。 Should I rather use a composite key
as the primary key
in the user_stock
table? 我是否应该使用composite key
作为user_stock
表中的primary key
?
它不应是关系表。用户库存表将用作主表。应该为user_Id和库存ID创建复合键,因为用户_id在交易表中不会唯一
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.