- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库系统概念02-关系模型
* */100 Updating cp 42 A mechanism to change a value in a tuple without charging all values in the tuple Use the generalized projection operator to do this task Each Fi is either the I th attribute of r, if the I th attribute is not updated, or, if the attribute is to be updated Fi is an expression, involving only constants and the attributes of r, which gives the new value for the attribute 自学内容 关系代数描述 * */100 Update Examples cp 42 Make interest payments by increasing all balances by 5 percent. Pay all accounts with balances over $10,000 6 percent interest and pay all others 5 percent account ? ? account_number, branch_name, balance * 1.06 (? BAL ? 10000 (account )) ? ? account_number, branch_name, balance * 1.05 (?BAL ? 10000 (account)) account ? ? account_number, branch_name, balance * 1.05 (account) 广义投影 自学内容 * */100 本章小结 Structure of Relational Databases 关系库结构 Fundamental Relational-Algebra-Operations 基本关系代数操作 Additional Relational-Algebra-Operations 增加的本关系代数操作 Extended Relational-Algebra-Operations 扩展的关系代数操作 Null Values 空值 Modification of the Database 数据库修改 * */100 Any Question ? 项目驱动目标: 如何建立和查询一个关系数据库: 一、数据库语言及应具备的处理能力 二、数据定义子语言DDL 三、数据查询子语言DQL1(基本查询) 四、数据查询子语言DQL2(复杂查询) 五、数据操纵子语言DML 主要讨论问题: 为什么需要数据库语言 什么是SQL语言,有何特点 数据库定义子语言提供那些功能 如何定义数据结构 数据库查询语言提供那些基本操作 为什么还需要嵌套子查询 为什么还需要视图 什么是关系连接,有哪些连接方式 数据更新子语言提供哪些处理能力 练习 2: P.45 : 2.5 b) d);2.7 a); 2.9 b);2.11 b) 预习下一讲内容(3章) * * * * */100 r ? s = t r ? s = t R-S=T T = ?T (r) –?T( (?T (r) x s) – ?T,S(r)) 1 。 r ? s = t, “乘不溢出” 要求 结果t是 ?T (r) 的子集 2 。?T (r) 中可能有一些不安分的元组t, 使得tXS在R之外,*乘要溢出“ 设法找出其中那些 不安分的元组t。 把它们扣除 4 ?T(r ) x s 先投影投影到T上再乘S ,属性集是还是R, 但元组可能会比r多 多了一些不安分的元组,他们造成 乘要溢出 5 相减,把一处溢出r的减去.剩下的全是 乘而溢出的结果 3 它就是r 6 再投影到T, 子集中乘要溢出“ 那些 不安分的元组t。 * */100 r ? s = t r ? s = t R-S=T T = ?T (r) –?T( (?T (r) x s) – ?T,S(r)) 1 r ? s = t“乘不溢出” 要求 结果t 是 ?T (r) 的子集 2 。?T (r) 中可能有一些不安分的元组t, 使得tXS在R之外,*乘要溢出“ 设法找出其中那些*乘要溢出元组
文档评论(0)