达内广州C++学院|c++培训|广州达内科技C++/C#培训|.NET培训|IT培训|达内广州岗顶中心 达内广州C++学院|c++培训|广州达内科技C++/C#培训|.NET培训|IT培训|达内广州岗顶中心
软件测试工程师
 当前位置:主页 > 高端课程 > 软件测试工程师 >

Crow’s Foot Notation

时间:2019-11-05  来源:未知  作者:广州达内培训

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.




上一篇:《老师说的都对》
下一篇:没有了

友情链接:
  • 全球最大晶圆代工半导体制造厂,台积电斥资订购艾斯摩尔机器设备
  • 英特尔依然是那个英特尔,且看英特尔的城防体系
  • 支持双 DRAM 内存接口,慧荣企业级 SSD 主控方案披露
  • 在全球被反垄断罚款,冤!高通到底哪里得罪了欧盟?
  • 强强联合!万业、微电子所和芯鑫共同打造全新半导体设备
  • 复旦大学校长称:对于集成电路产业发展,大学应该主动担当
  • 技术再升级!无锡中科芯攻克晶圆级再布线及晶圆级凸点制备关键技
  • 聚力!万业企业设立集成电路装备集团,提供自主可控设备
  • 德州仪器C2000微控制器增强连通性和控制性
  • 英特尔打出降价策略,以免被竞争对手 AMD 打败?
  • 贸易摩擦的闹剧没有赢家,苹果有勇气离开中国吗?
  • 图像信号与视觉处理器的发展趋势
  • 真干快消品定位方案班(第二期)火热开班
  • Java集合 ArrayList原理及使用
  • TDD(测试驱动开发)死了吗?
  • JAVA基础之XML相关
  • javaweb项目搭建ehcache缓存系统
  • 每日一码——字符串统计
  • 一篇文章帮你彻底搞清楚“I/O多路复用”和“异步I/O”的前世今生
  • 九:模板方法模式
  • 十二:命令模式(人员解耦和)
  • Java 转PPT为图片、PDF、SVG、XPS、ODP以及PPT和PPTX互转
  • SpringCloud学习(SPRINGCLOUD微服务实战)一
  • 记一次微信网页授权后获取用户信息并重定向
  • 速途新营销五点实战洞察解码“品效合一”
  • 十一:外观模式详解(Service,action与dao)
  • 手把手教你学会 基于JWT的单点登录
  • mysql锁机制总结,以及优化建议
  • 解决多个版本jar包冲突【jar内包名重命名】
  • 中国首张5G终端电信设备进网许可证 华为Mate 20 X 5G版入网
  • RPC之Thrift
  • 高级Java工程师必备 ----
  • 天猫618期间实物支付GMV增长38.5%
  • 换季了,老板你的库存处理好了吗?
  • 从“618”大数据看中国消费新活力
  • 小米生态链:贵在格局感与收放度
  • CODING 2.0 企业级持续交付解决方案
  • 老铁奇趴“新京济” 快手*京东618战报出炉
  • 中小企业新媒体运营基本技能
  • 上汽大通房车再度携手LINE FRIENDS 魔都巡游顺利开启
  • 华为高端手机国内市场份额超苹果夺得榜首
  • 中国智能制造分析报告
  • iPlus艾加营销助力腾讯广告牵手吴晓波 推进商业IP变现
  • 2019世界新能源汽车大会7月1日将在海南举行
  • 区域酒企如何转型突围
  • 时时彩论坛
  • 五星体育斯诺克
  • 北单比分直播
  • 河北11选5走势图
  • 福建体彩36选7开奖结果
  • 九龙图库下载