问题
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