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

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 entityrelationship 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
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)chapter3 Design Theory for Relational Databases.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)chapter11 The semi-structured data model Structured data.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)Chapter1 Introduction.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》教学资源_intro.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第二章 8086系统结构.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第一章 绪论(毛义梅).pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第四章 汇编语言程序设计_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第四章 汇编语言程序设计.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第十章 串行通信和可编程接口芯片8251A_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第十一章 A/D和D/A转换_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第八章 可编程计数器_定时器8253_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第八章 可编程计数器/定时器8253及其应用.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第五章 存储器_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第五章 存储器.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第二章 8086系统结构_习题及答案.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第二章 8086系统结构.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第九章 可编程外围接口芯片8255A_习题及解答.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第九章 可编程外围接口芯片 可编程外围接口芯片8255A及其应用.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第三章 8086/8088寻址方式和指令系统.pdf
- 上海交通大学:《微机原理与接口技术》课程教学资源(课件讲稿)第七章 微型计算机中断系统_习题与解答.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)Chapter5 Algebraic and Logic Query languages.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)Chapter6 The database Language SQL –as a tutorial.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)Chapter7 Constraints and Triggers.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》课程教学资源(课件讲稿)chapter8 Views, Indexes.pdf
- 上海交通大学:《数据库系统原理 The principle of Database System》教学资源_第三章习题与答案(第三版).doc
- 上海交通大学:《数据库系统原理 The principle of Database System》教学资源_第二章习题与答案(第三版).doc
- 上海交通大学:《数据库系统原理 The principle of Database System》教学资源_Chapter 1 Introduction.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_15 Introduction to matlab.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_16 MATLAB environment short.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_19 Recursion 1.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_20 Looking Ahead.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_Array and its Applications.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_examples on class design.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_Expressions and Statements.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_files_DataBase Design.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_Function.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_Introduction to Computer and Programming.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_Introduction to Vg101.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_objects and classes.pdf
- 上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Lecture Notes_programming style guide for C plusplus.pdf