首先,再次强调这是一个双语教程,所以学起来就会比较困难(正常操作,所以对自己有点信心吧小同学

正文开始,先复习一下上节课的内容)

Review

  • DB : Database
  • DBMS : Database Management System
  • DBS : Database System
  • Database System / file system (advantages / drawbacks)
  • Users of database system (five kinds of user)
  • Data model of database (Relational / Network / Hieriarchical / …)
  • View of Data(three levels includes View / Logical / Physical)
  • Database Language
  • Transaction Management
  • Query processing
  • History of database & challenges

Relational Model
the relational model was abstracted from table and processing methods of table .
SQL was proposed and developed based on relational model . It is the foundation of many database theories .
==>A relation is a table .

Domain (域) the range of values of Column / Attribute
the number of elements in the set is called Cardinality (基数) .

Cartesian product (笛卡尔积)
Formally , given sets of domain D1 , D2 , … , Dn , and the cartesian product is represented as :
D1 X D2 X … X Dn = { ( d1 , d2 , … , dn ) | di ∈ Di, i = 1,2,…,n}

The element of cartesian product , ( d1 , d2 , … , dn ) is called n-tuple (n元组) .
Each di in the tuple ( d1 , d2 , … , dn ) is called a component (分量) .
If the cardinality of Di is mi , then the cardinality if cartesian product .
i.e. the number of tuples is : m1 X m2 X … X mn
Formally , a relation r is a set of n-tuple ( d1 , d2 , … , dn ) where each di ∈ Di .
Not all tuples are meaningful .

Column Name / Attribute Name

Relation is denoted as R(A1:D1 , A2:D2 , … , An:Dn) , or briefly denoted as R(A1 , A2 , … , An) and we also call this kind of relation as Relation Schema .
R is the name of relation , Ai is the attribute , Di is the domain of attribute , n is the degree of relation ,the number of tuple in relation is called Cardinality of Relation .

Relation (Relation Instance 实例) and Relation Schema
One relation schema → many different relations (relation instances) .
Relation schema is the structure of relation , and relation (relation instances) is a snasphot of the data relation schema at a given instant in time .

关系的五个特性(ppt放太快没记下来英文就很尴尬)

  1. Homogeneity (同质) of the column / attribute
    Each component of one column comes from the same domain , and has a same data type .
  2. The order in which columns appear in a relation is irrelevant (无关,不相关) .
  3. The order in which tuples appear in a relation is irrelevant .
  4. Each tuple / row should be different from other , i.e. no two tuples in a relaction are allowed to have exactly the same value for all attributes .
  5. Attribute is atomic , and could not be divided anymore , and this character is also called NF .

Key : Candidate key [候选码 / 候选键]
Candidate key : an attribute or a group of attributes from a relation , its value or thier values can uniquely identify the tuple .
It is possible that there are more than one candidate key for a relation .

=======下次更新预 告—白白白白,不定时,因为 ------------

Primary key & Super key [主码和超码]
Primary key : to denote a candidate key that is chosen by the database designers as the principal means of identifying the tuples within a relation .
Super key : a collection of attributes which includes candidate key .

Single key / All key & Primary attribute / non-peimary key [单一码/全码 & 主属性/非属性码]
single key :the candidate key has only one attribute .
All key :the group of all attributes which appears in any candidate key .
Primary attribute :the attribute which appears in any candidate key .
Non-primary attribute :other attribute in a relation except all primary attributes .

Foreign key [外码]
Foreign key :在R1中不是候选码,在R2中是候选码(在R1 , R2中都存在)
其中R1–Referencing Relation R2–Referenced Relation

Integrity Constraint [完整性约束]

  1. Entity Integrity : The attribute values of candidate key is not allowed to be NULL .
  2. Referential Integrity (参照完整性)
  3. User-defined Integrity : A kind of integrity which is defined by users according to different application .

Database System - 2nd theory class : Database Theory 20/03/09相关推荐

  1. DATABASE SYSTEM CONCEPTS

    1实体集合关系及的概念并不精确,这是可能的.以多种不同的方式定义一组实地以多种不同的方式定义一组实体和他们之间的关系和他们之间的关系.在本节中,我们将研究E_R,数据库模式设计中的基本问题,第七第七十 ...

  2. psql: FATAL the database system is in recovery解决

    报错: FATAL: the database system is in recovery mode 解决思路: 在hawq master节点 1.执行hawq state ,提示 database ...

  3. 【数据库系统概念第七版(Database System Concepts 7th)配套SQL文件如何获取】

    数据库系统概念第七版(Database System Concepts 7th)配套SQL文件如何获取 数据库大黑书获取配套SQL文件 最后在数据库运行SQL文件即可 数据库大黑书获取配套SQL文件 ...

  4. Database System Concepts(Fourth Edition)

    Database System Concepts(Fourth Edition) 链接:http://codex.cs.yale.edu/avi/db-book/db4/slide-dir/ 来自 & ...

  5. postgresql 数据库 报错 FATAL: the database system is shutting down 解决方法

    目录 问题原因 解决过程 查看主机进程 关闭数据库 创建 postmaster.pid 文件 再次尝试关闭数据库 启动数据库 总结 问题原因 服务器在同一个数据目录上启动了两个PostgreSQL实例 ...

  6. 同步流复制报错“psql: FATAL: the database system is starting up”

    目录 环境 症状 问题原因 解决方案 相关文档 报错编码 环境 系统平台:Linux x86 Red Hat Enterprise Linux 6,Linux x86-64 Red Hat Enter ...

  7. 【Database System Concept 7th】Chapter 2读书笔记

    Chapter 2 Introduction to the Relation Model 2.1 Structure of Relational Databases 2.2 Database Sche ...

  8. Oracle Database 11G 完全备份[Whole Database Backups]概述

    Oracle Database 11G 完全备份[Whole Database Backups]概述 RMAN 的完全备份(Whole Database Backups using RMAN) Ora ...

  9. Mysql数据库备份的问题:mysqldump: Got error: 1049: Unknown database 'blog;' when selecting the database

    今天进行Mysql数据库备份时出现了下面的问题:mysqldump: Got error: 1049: Unknown database 'blog;' when selecting the data ...

最新文章

  1. 手把手教你 Socket 通信(TCP/IP)
  2. python测试开发自学教程-python测试开发学习笔记
  3. java大组件_Java的三大组件
  4. 跟各位读者朋友分享下公众号运营策略
  5. 环网工业交换机ERPS技术解析
  6. 三维网格精简算法java版_几种常见算法的精简版-
  7. java协同过滤推荐算法
  8. java 朋友圈功能开发_java开发的微信分享到朋友圈功能
  9. 代理服务器的速度慢的原因是什么?
  10. workman 日志_Workman手册笔记一
  11. DOM事件+正则表达式
  12. 【java】根据当前时区获取时间
  13. wisp5学习日记1
  14. 第三讲. COTS包交换介绍
  15. 输送FPGA人才,英特尔人才战略升级
  16. pytorch损失函数binary_cross_entropy和binary_cross_entropy_with_logits的区别
  17. xp职称计算机考试题库,全国职称计算机考试题库(WindowsXP模块)
  18. 平面解析几何----抛物线上两弦OAOB的斜率之和为定值和直线AB过定点的关系
  19. valgrind 工具介绍和简单的使用
  20. 电脑温度,电脑温度多少才算正常?如何查看电脑的硬件温度?

热门文章

  1. keil和proteus下载,和详细安装教程
  2. 中国推进大数据综合试验区建设 带动经济提质增效
  3. 【pytorch笔记】损失函数nll_loss
  4. 根据工厂日历自动计算请假时间
  5. 《游戏学习》 Java实现潜艇大战游戏源码
  6. 关于抢红包的_关于抢红包的qq说说大全
  7. uniapp 小程序获取手机号码 前端+php后台
  8. C++基础(Visual studio)
  9. Java应用程序的运行机制
  10. RTI Connext的TCP传输