http://www2.cs.uregina.ca/~bernatja/crowsfoot.html

Crow’s Foot Notation

A number of data modeling techniques are being used today. One of the most common is the entity relationship diagram (ERD). Several ERD notations are available. For the purposes of CS270 we will be using Crow’s Foot Notation[b1].

Components used in the creation of an ERD:

Entity – A person, place or thing about which we want to collect and store multiple instances of data. It has a name, which is a noun, and attributes which describe the data we are interested in storing. It also has an identifier, which uniquely identifies one instance of an entity. The attribute which acts as the identifier is marked with an asterisk.

[b2]

Relationship – Illustrates an association between two entities. It has a name which is a verb. It also has cardinality and modality.

[b3]

Cardinality and Modality are the indicators of the business rules around a relationship. Cardinality refers to the maximum number of times an instance in one entity can be associated with instances in the related entity. Modality refers to the minimum number of times an instance in one entity can be associated with an instance in the related entity.

Cardinality can be 1 or Many and the symbol is placed on the outside ends of the relationship line, closest to the entity, Modality can be 1 or 0 and the symbol is placed on the inside, next to the cardinality symbol. For a cardinality of 1 a straight line is drawn. For a cardinality of Many a foot with three toes is drawn. For a modality of 1 a straight line is drawn. For a modality of 0 a circle is drawn.

zero or more [b4]

1 or more [b5]

1 and only 1 (exactly 1) [b6]

zero or 1 [b7]

 

 

Cardinality and modality are indicated at both ends of the relationship line. Once this has been done, the relationships are read as being 1 to 1 (1:1), 1 to many (1:M), or many to many (M:M).

1:1

[b8]

1:M

[b9]

M:M

[b10]

1:M

[b11]

Typically, ERDs are much more complex than this, involving quite a number of entities and relationships. If we join all of the above relationships together and add a few attributes, a small collection of data might be depicted in the following way using Crow’s Foot Notation:

Consider the following business rules for a patient appointment system:

A doctor can be scheduled for many appointments, but may not have any scheduled at all. Each appointment is scheduled with exactly 1 doctor. A patient can schedule 1 or more appointments. One appointment is scheduled with exactly 1 patient. An appointment must generate exactly 1 bill, a bill is generated by only 1 appointment. One payment is applied to exactly 1 bill, and 1 bill can be paid off over time by several payments. A bill can be outstanding, having nothing yet paid on it at all. One patient can make many payments, but a single payment is made by only 1 patient. Some patients are insured by an insurance company. If they are insured, they can only carry insurance with one company. An insurance compnay can have many patients carry their policies. For patients that carry insurance, the insurance company will make payments, each single payment is made by exactly 1 insurance company.

Given the above information, the following ERD can be drawn:

Intersection Entities

Intersection entities are used in the resolution of a many to many relationship. This resolution is done in order to store additional information which doesn’t fit into the attribute list of either entity in the M:M relationship. For instance, in the instructor-course example given earlier, there is a M:M relationship between Course and Section. A course can have many sections, and a section can have many courses. If we want to know how many students are registered in a particular class, we cannot store the information on either entity. We could store the total number of students registered in all sections of a particular course, in the course entity, ie: 300 students are registered in CS270, all sections included. We could store the total number of students registered in all courses with a particular section number, in the section entity, ie: 25,000 students are registered in a section numbered 002. If we want more practical information, such as how many students are registered in section 002 of CS270, we need another entity in which to store the information. So, we create an intersection entity, and place it between its related entities with the additional attributes. The M:M relationship becomes two 1:M relationships. See resolution below.

Independent Entities

Independent entities are those which can exist without another entity. Student, seat, instructor etc. are examples of independent entities.

Dependent Entities

Dependent entities rely upon the existence of other entities. Some of their attributes are taken from the identifiers in the entities upon which they depend. Class is an example of a dependent entity. It relies upon course and section, and gets two of its attributes from their identifiers.


[b1]The crow's foot notation was invented by Gordon Everest, who originally used the term "inverted arrow" but now just calls it a "fork". For cardinality, a fork or crow's foot intuitively indicates "many", by its many "toes".

[b2]This is an entity named DESK. We want to store information about several desks. The information we want to collect and store are the desk id, colour of the desk, and desk size. These are the attributes of the entity. Desk_id is the identifier. Given the id of a desk, we would be able to seek out one specific desk, as no two would have the same id number.

[b3]This ia a relationship named “is assigned”. It is shown by a line which normally connects two entities together. No cardinality or modality has been assigned yet.

[b4]cardinality is many, modality is zero

[b5]cardinality is many, modality is 1

[b6]cardinality is 1, modality is 1

[b7]cardinality is 1, modality is zero

[b8]A student fills a seat. This is a 1:1 relationship. 1 student can fill a maximum of 1 seat. 1 seat can be filled by a maximum of 1 student. Each side of the relationship has a cardinality of 1. The modality on each side is also 1. A student must fill at least 1 seat, and 1 seat must be filled by at least one student. Although it may seem possible to have an empty seat, in which case the modality would be 0, the business rules we have defined determine that for the purposes of our database – we do not want to be able to store information about empty seats.

[b9]An instructor teaches a course. This is a 1:M relationship. One instructor can teach many courses, but one course can only be taught by one instuctor. The modality is one on both ends of the relationship. According to the business rules we have defined – an instructor must teach at least 1 course, and a course must be taught by 1 instructor.

[b10]A student takes a course. This is a M:M relationship. One student can take many courses, and one course can be taken by many students. For the purposes of the information we want to store, the business rules indicate that a student must take at least one course, and a course must be taken by at least one student. The modaility is 1 on both sides.

[b11]A professor teaches a section of a course. This is a 1:M relationship. One professor can teach many sections of a course, and 1 section of a course can only be taught by 1 instructor. On the modality side of things – a professor does not need to teach a section at all, so the modality is zero on that side of the relationshp. On the other hand, a section must be taught by 1 instructor.

Crow’s Foot Notation的更多相关文章

  1. FIT9132 Introduction to Databases

    FIT9132 Introduction to Databases2019 Semester 1Assignment 1 - Database Design - Monash Hospital (MH ...

  2. Monodraw for Mac(基于 ASCII 码设计编辑工具)破解版安装

    1.软件简介    Monodrawp 是 macOS 系统上一款专为 Mac 设计的强大的 ASCII 码设计编辑器,纯文本历经几十年而不衰.Monodraw for mac 可以创建基于文本的艺术 ...

  3. 3-MySQL DBA笔记-开发基础

    第二部分 开发篇 本篇首先讲述数据库开发的一些基础知识,如关系数据模型.常用的SQL语法.范式.索引.事务等,然后介绍编程开发将会涉及的数据库的一些技巧,最后结合生产实际,提供一份开发规范供大家参考. ...

  4. 数据仓库专题19-数据建模语言Information Engineering - IE模型(转载)

    Information Engineering采用Crow's Foot表示法(也有叫做James Martin表示法的),中文翻译中对使用了Crow's Foot表示法的模型也有笼统的称做鸭掌模型的 ...

  5. angular2系列教程(十一)路由嵌套、路由生命周期、matrix URL notation

    今天我们要讲的是ng2的路由的第二部分,包括路由嵌套.路由生命周期等知识点. 例子 例子仍然是上节课的例子:

  6. [LeetCode] Evaluate Reverse Polish Notation 计算逆波兰表达式

    Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, ...

  7. 【leetcode】Evaluate Reverse Polish Notation

    Evaluate Reverse Polish Notation 题目描述: Evaluate the value of an arithmetic expression in Reverse Pol ...

  8. 2014牡丹江K Known Notation

    Known Notation Time Limit: 2 Seconds      Memory Limit: 65536 KB Do you know reverse Polish notation ...

  9. leetcode150 Evaluate Reverse Polish Notation

    Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, ...

随机推荐

  1. python数据分析三个重要方法之:numpy和pandas

    关于数据分析的组件之一:numpy ndarray的属性     4个必记参数:ndim:维度shape:形状(各维度的长度)size:总长度dtype:元素类型   一:np.array()产生n维 ...

  2. Linux的用户切换、修改用户的用户名和密码

    一.用户切换 "$":普通用户提示符 "#":root用户提示符  1.普通用户到root: 方式一:命令:su然后输入root密码 此种方式只是切换了root ...

  3. Windows Server 2012R2 DHCP服务介绍及搭建 转载

    转载链接:https://blog.csdn.net/KamRoseLee/article/details/79251830   一.什么是DHCP DHCP(DynamicHost Configur ...

  4. 使用three.js创建大小不随着场景变化的文字

    使用three.js创建大小不随着场景变化的文字,需要以下两步: 1.将文字绘制到画布上. 2.创建着色器材质,把文字放到三维场景中. 优点: 1.跟用html实现文字相比,这些文字可以被模型遮挡,更 ...

  5. Ubuntu 一键伪装成Win 10,Kali Linux 2019 kali-undercover软件嫁接;

    今天,下午刷手机的时候,突然看到kali出了一个非常新颖的主题:该主题可以使得kali系统伪装成windows 10而变得低调起来:就像下面这样: 具体新闻链接:https://www.freebuf ...

  6. exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftp

    6月22日任务 14.4 exportfs命令14.5 NFS客户端问题15.1 FTP介绍15.2/15.3 使用vsftpd搭建ftp 14.4 exportfs命令 当我们修改nfs的配置文件e ...

  7. Hyperledger Fabric手动生成CA证书搭建Fabric网络

    之前介绍了使用官方脚本自动化启动一个Fabric网络,并且所有的证书都是通过官方的命令行工具cryptogen直接生成网络中的所有节点的证书.在开发环境可以这么简单进行,但是生成环境下还是需要我们自定 ...

  8. LeetCode 链表题 ( Java )

    leetcode 237. 删除链表中的节点 链接:https://leetcode-cn.com/problems/delete-node-in-a-linked-list/ 示例 : 输入: he ...

  9. 一文看尽Java-并发编程知识点

    一.前言     从7月份开始一直加班比较多,一直到双11结束,博客没跟上写,接下来写一点总结性的东西,比如Java并发编程总结.Mybatis源码总结.Spring源码和基础知识总结,首先来看下并发 ...

  10. OpenCV图像识别初探-50行代码教机器玩2D游戏【华为云技术分享】

    版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/devcloud/article/detai ...