ER图,是允许的吗? [英] ER diagram, is this allowed?

查看:285
本文介绍了ER图,是允许的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须根据关系模式创建一个ER图。

I have to create an ER diagram based on a relational schema.

有一个玩家表和一个区域表。

There is a table of players, and a table of zones. A player can 'live' in many zones, and each zone is owned by one or more players.

我想出了这个简单的ER图,但我是

I've come up with this simple ER diagram but I'm not sure having relationships going each way is allowed?

干杯

推荐答案

是的,这是一个完美的实体关系图。 (我不回答是否有意义:你仍然需要解决关系和基数。)

Yes, that is a perfectly good Entity Relation Diagram. (I am not responding as to whether it makes sense or not: you still need to resolve the Relations and Cardinality.)

使用正确的术语可以帮助人们准确地了解你正在讨论,以及您正在讨论的级别。宽松的谈话在讨论中导致更多的体积,浪费在澄清什么是什么意思的时间。

Using the correct terms helps people understand exactly what you are discussing, and which level you are discussing. Loose talk results in much more volume in the discussion, and time wasted in clarifying what you meant by which term. Not good for productive technical endeavours.


  1. 在这个早期阶段,模型实体和关系(而不是属性)是正常的,这就是为什么它被称为ER图;我们没有靠近建模的数据。关系是相关的,这就是为什么你在钻石和基数细节和评价他们的性质。目标是澄清真实的实体,以及它们之间的关系。多对多关系仍然是关系。 ERD是纯粹的逻辑,没有物理。

  1. At this early stage, it is normal to model Entities and Relations (not Attributes), that's why it is called an ER diagram; we are nowhere near modelling the data. The Relations are relevant, and that's why you are detailing and evaluating their nature in the diamonds and Cardinality. The goal is to clarify the true Entities, and their Relations to each other. Many-to-many relations remain as relations. The ERD is purely Logical, there is no Physical.

一旦你有信心,你已经得到实体和关系, a 数据模型(其中包括属性)。仍处于逻辑级别,n :: n关系仍为关系。

Once you have some confidence with that, that you have gotten the Entities and Relations right, you move onto a Data Model (which includes Attributes). Still at a Logical level, the n::n relations remain as relations.


  • 随着进度,您可以显示更多详细信息,例如每个属性的域。这是DataType,但是在逻辑层面,正如术语Entity = Table和Attribute = Column,Domain = DataType。


当您进入物理级时,数据模型具有表;列;数据类型。

When you get to the Physical level, the Data Model has Tables; Columns; DataTypes.


  • 和n :: n关系表示为关联表。


在我给出的关系模式中有一个名为life-in的联结表。但是,我认为当将关系模式映射到ER图时,连接表变成关系?


  • p>关系术语是关联表。
  • The Relational term is Associative table.

是的。如果它是纯n :: n表(仅包含父表的PK的两个FK),在ERD级别(仅逻辑),它是一个关系。

Yes. If it is a pure n::n Table (containing nothing but the two FKs to the PKs of the parent Tables), at the ERD level, which is Logical only, it is a Relation.

如果它有两个FK以外的列,则它是一个实体。

If it has Columns other than the two FKs, it is an Entity.

这篇关于ER图,是允许的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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