- 2
- 0
- 约3.35千字
- 约 34页
- 2022-04-05 发布于江苏
- 举报
第三章 关系模型及oracle对象关系数据库;关系数据库系统是支持关系模型的数据库系统。
1970年初,IBM公司的高级研究员Dr.E.F.Codd发表论文提出了关系模型,奠定了关系数据库的理论基础。Dr.E.F.Codd proposed the relational model for database systems in 1970s.
Vendors: ORACLE(9i ),IBM(DB2) , Microsoft (ACESS and SQLServer), Foxbase(Foxpro), Sybase;关系的定义;主码(primary key):表中的某个属性组,它可以唯一确定元组。each row of data in a table is uniquely identified by a primary key. It must contain a value
外码(foreign key):you can logically relate information from multiple tables using foreign keys.
;关系模型;关系代数;例如, D1=导师集合= {张清玫,刘逸},
D2 =专业集合= {计算机,信息},
D3 =研究生集合={ 李勇,刘晨,王名}
则 D1 X D2 X D3 ={ (张清玫,计算机,李勇 ) ,
(张清玫,计算机,刘晨 ) ,
(张清玫,计算机,王名 ) ,
(张清玫,信 息,李勇 ) ,
(张清玫,信 息,刘晨 ) ,
(张清玫,信 息,王名 ) ,
(刘 逸,计算机,李勇 ) ,
(刘 逸,计算机,刘晨 ) ,
(刘 逸,计算机,王名 ) ,
(刘 逸,信 息,李勇 ) ,
(刘 逸,信 息,刘晨 ) ,
(刘 逸,信 息,王名 ) },
共12个元组。笛卡儿积可对应一张二维表。
; basic operators
Set intersection 交
Union 并
set difference 差(集合差)
Cartesian product 笛卡儿积
Select 选择
Project 投影
Natural join 自然连接
Division 除
The operators take two or more relations as inputs and give a new relation as a result.;(1) Select Operation – Example;Notation: ? p(r)
p is called the selection predicate
Defined as:
?p(r) = {t | t ? r and p(t)}
Where p is a formula in propositional calculus consisting of terms connected by : ? (and), ? (or), ? (not)Each term is one of:
attribute op attribute or constant
where op is one of: =, ?, , ?. . ?
Example of selection: ? branch-name=“Perryridge”(account);(2) Project Operation – Example;Notation: ?A1, A2, …, Ak (r)
where A1, A2 are attribute names and r is a relation name.
The result is defined as the relation of k columns obtained by erasing the columns that are not listed
Duplicate rows removed from re
您可能关注的文档
- 关注制造业向中国转移的投资机会.pptx
- 关注燃气安全呵护生命健康.pptx
- 关税与非关税政策.pptx
- 关系管理艺术.pptx
- 关系营销的特点与关系营销的策略.pptx
- 关键绩效指标的设定.pptx
- 典型设备电气控制电路分析.pptx
- 养老规划、婚姻及财产培训课件.pptx
- 内资房地产所得税讲义.pptx
- 内部与外部招聘.pptx
- (正式版)DB51∕T 1867-2014 《袋栽黑木耳生产技术规程》.docx
- (正式版)DB51∕T 2413-2023 《油橄榄密植丰产栽培技术规程》.docx
- (正式版)DB51∕T 2436-2017 《川菜东坡一品肉烹饪工艺技术规范》.docx
- (正式版)DB51∕T 2396-2017 《农村电子商务服务站(点)服务与管理规范》.docx
- (正式版)DB51∕T 2419-2017 《桢楠扦插育苗技术规程》.docx
- CN105145773B 一种无花果曲奇饼干及其制作方法 (江苏农林职业技术学院).docx
- CN105203825A 微测量电极的制作方法和热电势的测量方法及相关装置 (国家纳米科学中心).docx
- CN105137533B 一种啁啾光纤光栅及其制作方法 (南京航空航天大学).docx
- (正式版)DB51∕T 2453-2018 《巴山新居公共管理指南》.docx
- (正式版)DB51∕T 1892-2014 《川西北地区沙化土地治理技术规程》.docx
原创力文档

文档评论(0)