ERD - 鱼尾纹表示法
我正在研究数据库建模的鱼尾纹符号。我有一个问题。我看到一个图表(我认为是鱼尾纹符号),其中我看到有 2 个实体,它们之间有 2 个关系箭头。除此之外,只有一端定义了最小和最大基数。另一端仅定义一个基数(0 或 1)。
这听起来像“鱼尾纹记法”吗?这是正确的吗?网上有什么好的学习鱼尾纹表示法的教程吗?
I am looking at crow's foot notation for db modelling. I have a question around it. I came across a diagram (which I think is crow's foot notation) where I saw that there were 2 entities that had 2 relationship arrows between them. In addition to this, only one end is having minimum and maximum cardinality defined. Other end is just having a single cardinality defined (either 0 or 1).
Does this sound like 'crow's foot notation'? Is this correct? Are there any good tutorials online for learning crow's foot notation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标准的伟大之处在于有很多可供选择!
不存在“鱼尾纹表示法”这样的(单一)事物。正如这篇维基百科文章所解释的,有许多不同的工具使用鱼尾纹表示法的变体。
鱼尾纹表示法通常涉及实体的框和关系的线。关系线上通常有标记来说明关系两端的基数。用于标记基数的图形约定因一种实现而异。有些人使用图形约定(方形或对角鱼尾纹、单斜线或双斜线、箭头、空心圆和实心圆等),而其他人则使用数字和字母,例如:0,1 或 1,n 等。
还要记住不同版本的乌鸦脚表示法可以包括有关实体和关系的其他信息,例如哪些实体“强”,哪些实体“弱”(“弱”:其候选键的一部分由一个或多个关系定义)。
我一直发现鱼尾纹表示法(我自己喜欢 James Martin 的 IE 表示法)是表示 ERD 的有效方式。我认为,如果您选择一种您喜欢的约定,您将能够让几乎所有开发人员或 DBA 甚至大多数用户了解您试图传达的有关数据模型的内容。
一旦你选择了一个约定,我相信维基百科或谷歌会很快找到一个参考,帮助你轻松学习它。
The great thing about standards is that there are so many to choose from!
There is no such (single) thing as "crows foot notation". As this Wikipedia article explains, there are a number of different tools that use variations on crows foot notation.
Crows foot notation generally involves boxes for entities and lines for relationships. There are typically markings on the relationship lines that illustrate the cardinality at each end of the relationship. The graphical conventions used for marking cardinality vary from one implementation to another. Some people use a graphical convention (square or diagonal crows feet, single or double slashes, arrows, open and filled circles, etc) while others use numbers and letters, like: 0,1 or 1,n etc.
Keep in mind too that different versions of crows foot notation can include other information about the entities and relationships, such as which entities are "strong" and which are "weak" ("weak": part of their candidate key is defined by one or more relationships).
I have always found crows foot notation (I like James Martin's IE notation myself) to be a powerful way of representing an ERD. I think if you pick a convention that you are comfortable with you will be able to get just about any developer or DBA and even most users to understand what you are trying to convey about your data model.
Once you've picked a convention, I'm sure Wikipedia or Google will quickly turn up a reference that will help you learn it easily.