当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

《数据库应用基础》第2章 关系模型(1/2)

资源类别:文库,文档格式:PDF,文档页数:54,文件大小:351.16KB,团购合买
2.1 基本概念 2.2 关系代数 2.3 查询优化
点击下载完整版文档(PDF)

数据库应用基础 Fundamental and Application of Database 第二讲 测控技术与自动化教研中心冯仁剑

Fundamental and Application of Fundamental and Application of Database Database 数据库应用基础 数据库应用基础 第二讲 测控技术与自动化教研中心 测控技术与自动化教研中心 冯仁剑

第2章关系模型 >21基本概念 >22关系代数 >23查询优化

第2章 关系模型 ¾ 2.1 基本概念 ¾ 2.2 关系代数 ¾ 2.3 查询优化

2.1关系模型的基本概念 1970年,IBME.F.Cod提出 二维表 表名 自动化学院01班学生名单 表头 学号姓名性别出生日期 身高 200001林男1982-12北京188 20010联大民男198302】辽宁165 教数据)1200023顾芳女1982-09天津100 200024刘得华男1982-09香港176 填表囗修改删除查淘

2.1 关系模型的基本概念 关系模型的基本概念 1970年,IBM E. F. IBM E. F. Codd 提出 二维表 表名 自动化学院01班学生名单 表头 学 号 姓 名 性别 出生日期 籍贯 身高 20000121 王 林 男 1982-12 北京 188 20000122 张大民 男 1983-02 辽宁 165 20000123 顾 芳 女 1982-09 天津 160 20000124 刘得华 男 1982-09 香港 176 ……. ……. ……. ……. ……. ……. 数据 填表 修改 删除 查询

21关系模型的基本概念 关系规范化的二维表 (关系名 关系模式 Student(Sno, Sname, Ssex, Sbirthday, Soren, Height 元组》20001林男19212北京188 200002张大民男1983-02辽宁165 实例>20003顾芳女198249天津10 20000124刘得华男1982-09香港176

2.1 关系模型的基本概念 关系模型的基本概念 关系 规范化的二维表 ……. ……. ……. ……. ……. ……. 20000124 20000124 刘得华 男 1982-09 香港 176 20000123 20000123 顾 芳 女 1982-09 天津 160 20000122 20000122 张大民 男 1983-02 辽宁 165 20000121 20000121 王 林 男 1982-12 北京 188 Student(Sno Student(Sno, Sname, Ssex, Sbirthday Sbirthday, Sorient Sorient, Sheight Sheight 关系模式 元组 关系名 实例

文件()编辑E查(Q工具(D窗口()帮助出 Northwind 胃〓 刘器0) x Cust omer ID CompanyName ICont Name Cont actTitle Address ciaomao (sa) LALFKI Alfreds Futterkiste Maria Anders Sales Represent ative Obere Str. 57 2ANATR na Trujillo Emparedados y helados Ana Trujillo Avda. de la constitucion 222 master 3ANTON Ant onio Moreno Taqueria Antonio Mor Mataderos2312 Around the horn Thomas Hardy ales Represent ative 120 Hanover Sq. BERGS Berglunds snabbkop Christina Berglund Order Administrator Berguvsvagen8 Blauer See Delikatessen Hanna Moos Sales Represent ative Forsterstr. 57 口用户表 BLONPBlondesddsl pere et fils Frederique Citeaux Marketing Manager 24, place Kleber 8BOLID mldas prepar adas Martin Sommer 中国dbo9 BONAP Bon Elizabeth Lincoln Accounting Manager 23 Tsawassen Blva o Lebihan Owmer ue des bout 10 BOTTM Bottom-Dollar Markets 11BSBEV Bs Beverages Victoria Ashworth Sales Represent ative Fauntleroy circus +中+ 12 CACTU Cactus Comidas para llevar Patricio Simpson Sales Agent Cerrito 333 Centro comercial Moctezuma Francisco Chang Marketing Manager Sierras de Granada 9993 14 CHOPS Chop-suey Chinese Yang Yang Owmer Hauptstr. 29 15c0 Comercio mineiro Pedro afonso Sales Associate Av. dos lusi adas, 23 16 CONSH Consolidated Holdings Elizabeth Brown Sales Represent ative Berkeley Gardens 12 Brewery 17 Drachenblut Delikatessen Syen Ottlieb Order Administrator Walserweg 21 DUMON Du monde entier Janine Labrune 67, rue des Cinquante otages 19 EASTC Eastern Cornection Ann devon Sales Agent 35 King George 口系统表 Ernst handel Roland Mendel es ager 口视图 21FAMIA Familia Arquibaldo iaCruz Marketing Assist ant Rua Ords,92 存储过2 FISSAFISSA Fabrica Inter. Salchichas S.A. Diego Roel Accounting Manager C/Moralzarzal,86 函数 23FOLIG Folies gourmandes Mart i ine Nan Assist ant Sales Agent184,c中…幽目rmai 口用户定24 FOLKo Folk och fa Maria larsson Owmer Akergat an 「25 Frankenversand Peter Franken Marketing Manager Berliner Platz 4 26 FRANR France restauration Carine Schmitt Marketing Manager 54, rue royale 公用对象 27FRANS Franchi S.p.A. Paolo Accorti Sales Represent ative Via Monte Bianco 34 配置函数 28 FURIB Furia Bacalhau e Frutos do Mar Lino Rodrigue Sales Manager Jardim das rosas n.32 游标函数 29 GALED Galeri a del gastronome 日期和时 Eduardo Saavedra Marketing Manager Rambla de Catalui 数学函数 30 GODos Godos Cocina Tipica Jose Pedro Freyre Sales Manager C/Romero,33 聚合函数 31 GOURL Gourmet Anchoret tes andre fe onseca a⊥es Av.Brasil,442 元数据函菱 32 GREAL Great Lakes Food Market HowardSryder Marketing Manager 2732 Baker Blvd. 安全函数 GROSELLA-Resta aurant e Manuel Pereira 5 Ave, Los Palos grandes 1字算串函 Hanari Carnes Mario Pontes Accounting Manager Rua do Paso,67 对象模板 aoao(60)s(53) Northwind9!行行1,列 NUM

文件()编辑E查(Q工具(D窗口()帮助出 Northwind 胃〓 刘览器 OrderiN Cust omerID EmployeeID orderDate Shipped ciaomao (sa) 06-07-0400:00019900100000199071 210249 996-07-0500:00:0001998-08-1600:00:00001996-07-1 maste 310250 HANAR 1996-07-0800:00.0001990-0500:00:0.0019907-1 model 4 434 1996-07-08000.00099608-05000.000196-07-1 510252 1996-07-0900:00.0001996-08-0600:00.00019807-1 Ror thind 6 TAR 1996-07-1000:00:000198-07-24000.000199607-1 口用户表 710254 CHOPS 5 1998-07-1100:00.00019808-0800:000198-07- 由国dbo. Categories RICSU 中国dbo. CustomerCustomerDemo 19807-1200000909090000.00907 910256 WELLI 19807-1500000908-1200:00019807-1 -a dbo. Customer Demographics 010257 196-07-1600:00.00019808-1300:00:0001996-07-2 1110258 ERNSH1 196-07-1700:00.000198908-1400:00:0000198-07-2 中国dbo.Em1 loyees 1210259 NTC 1996-07-1800:00001986-08-1500:00:00001996-07-2 #a dbo. EmployeeTerritories 1310260 a dbo.Order Detail 996-07-1900:00:00.000196-08-1600:00:00.000196-07-2 1410261 4 白dbo.0 Orders QUEDE 19907-1900:00:0001996-08-1600:00:00.0001996-07-3 15 列 ATTC 1996-07-22000.000196-08-1900:00.00019807- 口索引 1610263 ERNSH 198072300:00019802000019013 中口约束 1710264 19907-2400:00.000198908-2100:00.00019808- 中口相关性 1810265 BLONP 1996-07-2500:0000198-08-2200:00:0001996-08-1 口触发器 91026 WARTH 1996-07-2600:0000199-09-0600:00:00001996-07-3 中面dbo. Products 2010267 1996-07-2900.000196-08-2600:00.000919808-0 2110268 198-07-3000:00:00001996-08-2700:00:0.0001996-08-0 中图bo. Shippers 10269 ITC 1996-07-3100:00:0001996-08-1400:00:0.0001996-08-0 2310270 WARTH 996-08-0100:00:0001998-08-29中,幽目98-08-0 出面dbo. Territories 2410271 SPLIR 口系统表 2510272 ATTC 34851663 1996-08-0100:00:00.0001996-08-2900:00:00.0001996-08-3 1996-08-0200:00.000196-08-3000:00.00019908-0 口视图 10273 QU 1996-08-05000:00019809-020:000.00098-08- 存储过程 2710274 口函数 1996-08-0600:00:000198-09-03000.0001996-08- 2810275 MAGAA 口用户定义的数据类型 1996-08-07000009809-000:00.0009-08 910276 1996-08-0800:00.000199608-2200:00:00.0001996-08-1 3010277 1996-08-0900:00:00001996-09-0600:00:0.0001996-08- 用对象 3110278 199808-1200:00:0001996-09-0900:00:00.0001996-08-1 配置函数 3210279 36182882 199808-1300:00:0001996-09-1000:00:0.000196-08-1 游标函数 1996-08-14000.00019609-11000.000196-09 日期和时间函数 3410281 ROMEY 1996-08-1400:00:0001996-08-2800:00:0.0001996-082 对象巴模板厂 xiaomao(8.) sa(54)Northwind NUM

21关系模型的基本概念 关系 码(键,Key):区分不同元组的属性集合 口语义决定 口具有最小性 超码( Super Key):包含码的的属性集合 候选码: 主码( Prime Key) 域( omain):属性的取值范围

2.1 关系模型的基本概念 关系模型的基本概念 关系 码(键,Key): 区分不同元组的属性集合 区分不同元组的属性集合 ‰ 语义决定 ‰ 具有最小性 超码(Super Key): (Super Key): 包含码的的属性集合 包含码的的属性集合 候选码: 主码(Prime Key): (Prime Key): 域(Domain) (Domain):属性的取值范围 属性的取值范围

21关系模型的基本概念 关系的性质 列是同质的 2.属性名不同 3.列的次序无关 4.任两个元组不能完全相同 5.元组次序无关 6.熟悉必须取原子值

2.1 关系模型的基本概念 关系模型的基本概念 关系的性质 1. 列是同质的 2. 属性名不同 3. 列的次序无关 4. 任两个元组不能完全相同 任两个元组不能完全相同 5. 元组次序无关 6. 熟悉必须取原子值 熟悉必须取原子值

关系模型 数据模型一一关系 数据操作一一增加、删除、修改、查找 数据完整性约束 1.实体完整性( Entity Integrity) 2.参照完整性( Referential Integrity) 3.用户定义完整性( User-defined Integrity)

关系模型 数据模型--关系 数据操作--增加、删除、修改、查找 --增加、删除、修改、查找 数据完整性约束 数据完整性约束 1. 实体完整性(Entity Integrity) (Entity Integrity) 2. 参照完整性(Referential Integrity) (Referential Integrity) 3. 用户定义完整性 用户定义完整性(User-defined Integrity) defined Integrity)

关系模型 关系模型的优点 (1)简明性 ②2精确性 3)数据独立性 数据结构和操作独立于存储方式

关系模型 关系模型的优点 关系模型的优点 ⑴ 简明性 ⑵ 精确性 ⑶ 数据独立性 数据结构和操作独立于存储方式 数据结构和操作独立于存储方式

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共54页,可试读18页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有