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

上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)chapter4 High-level Database Models

资源类别:文库,文档格式:PDF,文档页数:127,文件大小:464.01KB,团购合买
Entity/Relationship Models (E/R diagram) Unified Modeling Language (UML) Object Definition Language (ODL) Hot to Transfer them to a relational model
点击下载完整版文档(PDF)

Chapter 4 High-level Database Models Entity/Relationship Models (E/R diagram) Unified Modeling Language (UML) Object Definition Language (ODL) Hot to Transfer them to a relational model 1

1 Chapter 4 High-level Database Models Entity/Relationship Models (E/R diagram) Unified Modeling Language (UML) Object Definition Language (ODL) Hot to Transfer them to a relational model

Introduction ▣现实世界:客观存在的世界。 ▣信息世界:现实世界在人们头脑中的反映。 ▣机器世界:信息世界的信息在机器世界中以数据的形 式存放。 reality-》information world-》machine world E-R data model relational model√ UML object-relational model ODL object-oriented model 2

2 Introduction † 现实世界:客观存在的世界。 † 信息世界:现实世界在人们头脑中的反映。 † 机器世界:信息世界的信息在机器世界中以数据的形 式存放。 reality - 》information world- 》 machine world E-R data model relational model √ UML object-relational model ODL object-oriented model

Purpose of E/R Model The E/R model allows us to sketch database schema designs. Includes some constraints,but not operations. Designs are pictures called entity- relationship diagrams. Later:convert E/R designs to relational DB designs. 3

3 Purpose of E/R Model † The E/R model allows us to sketch database schema designs. „ Includes some constraints, but not operations. † Designs are pictures called entity￾relationship diagrams. † Later: convert E/R designs to relational DB designs

Framework for E/R Design is a serious business. The "boss"knows they want a database,but they don't know what they want in it. Sketching the key components is an efficient way to develop a working database

4 Framework for E/R † Design is a serious business. † The “boss ” knows they want a database, but they don ’t know what they want in it. † Sketching the key components is an efficient way to develop a working database

Entity/Relationship Model Entity like objects,=things Entity set like class set of similar Entity or objects Attribute=property of entities in an entity set,similar to fields of a struct. Relation=connect two or more entity set In diagrams, entity set rectangle; attribute:oval, relation:diamonds 5

5 Entity/Relationship Model † Entity like objects, =things † Entity set like class = set of similar Entity or objects † Attribute=property of entities in an entity set, similar to fields of a struct. † Relation=connect two or more entity set In diagrams, entity set : rectangle; attribute: oval, relation: diamonds

Entity/Relationship Diagrams: example ID name address Students taking Course No.)( name teacher 6

6 Entity/Relationship Diagrams: example Students ID name address Course taking No. name teacher

Relationships Binary (relation between two entity sets) Multiway (relation between more than two entity sets) Multiplicity of relationships:Express the number of entities to which another entity can be associated via a relationship set. 7

7 Relationships † Binary (relation between two entity sets) † Multiway (relation between more than two entity sets) † Multiplicity of relationships: Express the number of entities to which another entity can be associated via a relationship set

Binary Multiway Relationships ID name address Students TA Students 卡nros taking Course Course Assisting TA No.)( name teacher 8

8 Binary & Multiway Relationships Students ID name address Course taking No. name teacher TA Assisting Course Students TA Enrolls

Beers-Bars-Drinkers Example name )address license bars <Serves Frequents Beers Likes Drinkers name (manf name addr 9

9 Beers-Bars-Drinkers Example bars Beers Drinkers Serves Likes Frequents name address license name manf name addr

Example:3-Way Bar Dr inker Beer Relationship Joe's Bar Ann Miller Sue's Bar Ann Bud Sue's Bar Ann Pete's Ale Joe's Bar Bob Bud name addr Joe's Bar Bob Miller Joe's Bar Cal Miller Sue's Bar Cal Bud Lite license Bars name Suppose that drinkers will Beers only drink certain beers manf at certain bars. Preferences Our three binary relationships Likes, Sells,and Frequents name do not allow us to make this distinction. Drinkers But a 3-way addr 10 relationship would

10 Example: 3-Way Relationship Bars Beers Drinkers name name addr manf name addr license Preferences Suppose that drinkers will only drink certain beers at certain bars. Our three binary relationships Likes, Sells, and Frequents do not allow us to make this distinction. But a 3-way relationship would

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

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

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