如何设计数据库表和关系 [英] How to design the database tables and relationships

查看:153
本文介绍了如何设计数据库表和关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为其购买和交易创建一个系统,最初认为数据库需要像这样。

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

但是进入系统后


  • 需要不时购买供应商的产品

  • 可以从

所以我将数据库更改为这种方式。

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?

https://imgur.com/n1zFyC8

推荐答案

建议您研究一下实体关系模型以及所有数据库设计的各个阶段(需求,概念,逻辑,实现)。错误的数据库设计会对性能和体系结构方面的所有基于它的软件产生负面影响。

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.

这篇关于如何设计数据库表和关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆