How to design the database tables and relationships

爱⌒轻易说出口 提交于 2019-12-25 01:24:36

问题


I was creating a system for its purchases and transactions and initially thought the db would needed to be look like this.

https://imgur.com/0Agl7PZ

But after getting into the system

  • The products from the suppliers are needed to be bought time to time
  • The same product can be get from different suppliers.

So I changed the db to this way.

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?

https://imgur.com/n1zFyC8


回答1:


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.



来源:https://stackoverflow.com/questions/56825072/how-to-design-the-database-tables-and-relationships

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!