星空网 > 软件开发 > 数据库

数据库复习③

数据库复习③

2016年6月15日

15:24

Main ER Model ER模型

1. ER模型中的约束constraints有哪些?

   Single value constraints 单值约束

    EX:  a person can have only one father.

  Referential integrity constraints 引用完整性约束

    EX: if you work for a company, it must exist in the database

  Domain constraints 域约束

    EX: peoples’ ages are between 0 and 150.

2.ER图中的各种键Keys概念

   super key 超键

     A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity

    在关系中能唯一标识元组的属性集称为关系模式的超键

  candidate key  候选键

    A candidate key of an entity set is a minimal super key

    不含有多余属性的超键称为候选键

    举例:Customer_id is candidate key of customer

  primary key 主键

     Although several candidate keys may exist, one of the candidate keys is selected to be the primary key

    用户选作元组标识的一个候选键程序主键

  Foreign key 外键

    完整性约束的一种,要求该属性在另一表的某个key中出现。

3.弱实体集Weak Entity Sets

  From https://en.wikipedia.org/wiki/Weak_entity

  In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key. The foreign key is typically a primary key of an entity it is related to.

4.ER模型的原则

  • 避免冗余Avoid redundancy
  • 限制弱实体集的使用Limit the use of weak entity sets.
  • 如果选为属性时是时不要使用实体集Don’t use an entity set when an attribute will do.

5.好的ER图举例:

 数据库复习③

6.差的ER图举例:

数据库复习③

数据库复习③

7.ER图举例:

 数据库复习③

ER图练习题链接:http://www.cnblogs.com/zpfbuaa/p/5256187.html 

数据库知识点①~⑤链接:http://www.cnblogs.com/zpfbuaa/p/5358035.html

数据库复习链接①~待更新:http://www.cnblogs.com/zpfbuaa/p/5585349.html

数据库基础知识考题链接:http://www.cnblogs.com/zpfbuaa/p/5442113.html




原标题:数据库复习③

关键词:数据库

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

还在为打造爆款发愁?亚马逊平台爆款打造秘籍分享大全!:https://www.ikjzd.com/articles/10796
亚马逊运营爆单,应该这样去优化listing!:https://www.ikjzd.com/articles/107960
亚马逊竞品那么多,我该怎么写好五点描述?:https://www.ikjzd.com/articles/107961
亚马逊卖家必修课:动态定价策略!:https://www.ikjzd.com/articles/107962
亚马逊中小卖家如何高效地做站外引流?:https://www.ikjzd.com/articles/107963
做好亚马逊广告运营该有哪些是必不可少的?:https://www.ikjzd.com/articles/107964
TikTok斥资210万美元游说美国参议院阻止法案通过 :https://www.kjdsnews.com/a/1836653.html
TikTok斥资210万美元游说美国参议院阻止法案通过 :https://www.goluckyvip.com/news/188220.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流