问题描述
我正在为其购买和交易创建一个系统,最初认为数据库需要像这样。
I was creating a system for its purchases and transactions and initially thought the db would needed to be look like this.
但是进入系统后
- 需要不时购买供应商的产品
- 可以从
所以我将数据库更改为这种方式。
So I changed the db to this way.
我仍然想知道这是最好的方法。以及product_purchase和order_products表是否多对多表?
I'm still figuring out is this the best approach. And also is the product_purchase and order_products tables are many to many tables?
推荐答案
建议您研究一下实体关系模型以及所有数据库设计的各个阶段(需求,概念,逻辑,实现)。错误的数据库设计会对性能和体系结构方面的所有基于它的软件产生负面影响。
I suggest you to study about entity relationship model and all the phases of a database design (requirements, conceptual, logic, implementation). A wrong database design will influence negatively all the software that will be based on it in terms of performance and architecture.
这篇关于如何设计数据库表和关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!