简体   繁体   English

MySQL Workbench 中的 ER 图是关系模型吗?

[英]Does ER Diagram in MySQL Workbench a Relational model?

Im trying to understand this situtation.我试图了解这种情况。 What is the difference between ER and Relational Model for mysql. mysql 的 ER 和关系模型有什么区别。 It looks like relational model more than an actual ERD on MySQL so why is it called ER than ?它看起来更像是关系模型而不是 MySQL 上的实际 ERD,那么为什么它被称为 ER 而不是?

The ER model and relational model aren't MySQL specific. ER模型和关系模型不是MySQL特定的。 They're used for conceptual and logical modeling, respectively. 它们分别用于概念和逻辑建模。 A SQL or MySQL-specific model would be called a physical model. SQL或MySQL特定的模型称为物理模型。

The diagrams in MySQL Workbench (and many similar tools) are physical models which abuse ER terminology. MySQL Workbench(和许多类似的工具)中的图是滥用ER术语的物理模型。 It allows one to design tables, columns, primary keys, foreign key constraints and indices. 它允许设计表,列,主键,外键约束和索引。 It doesn't distinguish between entity tables and relationship tables as the ER model does, but calls all tables entities and confuses relationships with foreign key constraints. 它不像ER模型那样区分实体表和关系表,但是调用所有表实体并混淆与外键约束的关系。 Thanks to this, the idea of n-ary relationships is lost and users are led back to network model databases. 由于这一点,n-ary关系的想法丢失了,用户被带回网络模型数据库。

They're not relational data models either. 它们也不是关系数据模型。 They don't capture logical domains or roles, functional or multivalued dependencies, or various constraints. 它们不捕获逻辑域或角色,功能或多值依赖关系或各种约束。 They don't support dependency-preserving transformations. 它们不支持保留依赖项的转换。

The difference between the ER and relational model is that the relational model has the full power of first-order logic while the ER model is more of a recipe approach. ER和关系模型之间的区别在于关系模型具有一阶逻辑的全部功能,而ER模型更多的是配方方法。 ER semantics are more familiar to the untrained eye, but add extra complexity. ER语义对于未经训练的眼睛更为熟悉,但增加了额外的复杂性。 There are some dependencies and constraints that can't be represented in ER, and its focus on 3NF may result in data anomalies. 有一些依赖关系和约束无法在ER中表示,并且它对3NF的关注可能导致数据异常。 Despite that, it's useful for initial/informal data modeling and to communicate ideas to business users. 尽管如此,它对于初始/非正式数据建模以及向业务用户传达想法非常有用。

So why are diagrams like those in MySQL Workbench called ER diagrams then? 那么,为什么像MySQL Workbench这样的图又称为ER图呢? I think it's mostly due to lack of understanding and buzzword compliance, two factors that are rife in our industry. 我认为这主要是由于缺乏理解和流行语合规性,这两个因素在我们的行业中很普遍。

ER Diagram is a visual representation of the Database. ER图是数据库的直观表示。 It is the primary level of designing a good database. 这是设计一个好的数据库的主要层次。 we use ER diagram to identify the entities and relations. 我们使用ER图来标识实体和关系。 later entities became as TABLE and relations may became as Foreign keys. 后来的实体变为TABLE,关系可能变为外键。 it is a transforming process ERD ---> Relational MODEL Relational model is complex. 它是一个转化过程ERD --->关系模型关系模型是复杂的。 we can achieve the Relational model using ER Diagram. 我们可以使用ER图实现关系模型。 ER diagram to Relational model ER图到关系模型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM