第4讲-概念模型设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

2.2 联系集
8
2.2 联系集
联系也可以 有属性吗?
Relationship Sets (Cont.)
• An attribute can also be property of a relationship set.
• For instance, the advisor relationship set between entity sets instructor and student may have the attribute date which tracks when the student started being associated with the advisor
9
2.2 联系集
联系集的度 是指什么?
Degree度 of a Relationship Set
• binary relationship
• involve two entity sets (or degree two).
• most relationship sets in a database system are binary.
• 主要任务:
为一个应用设计数据库是一个极其复杂的任务,通常需要考虑:
• 数据库模式
(优良的数据结构)
• 数据访问与更新方式 (高效的数据存取)
• 数据访问的安全模式 (可靠的数据安全)
• 数据的物理存储模式 (存放位置与次序)
• 以及数据约束, … 等多个任务
• 首要难题:
• 数据库设计者必须与应用的用户进行交互以理解应用的需求,并把它们用
概念模型映射到系统选用的商业产品数据模型(逻辑模型)
更准确(细化)地讲,还应当包括数据完整性和安全性设计阶段
• 数据物理组织阶段(物理设计) 根据逻辑模型和应用访问要求,进行物理设计(物理模型)
• 数据库设计完成之后的工作(数据库实现-创建结构) • 根据逻辑设计和物理设计要求,实际建立应用的数据结构 • 比如,采用SQL语言创建关系数据模式
高层次(抽象-概念模型)的形式表示出来,便于用户理解、确认和提出修改
建议。——客观模型
• 然后才考虑如何将其设计转化为便于在计算机上实现的更低层次(逻辑存
储模式-关系模式,物理存储模式等)。——主观模型
3
一 数据库设计过程
返回讨论页
开展数据库设计 的前期基础?
数据库设计的基本阶段
数据库设计的 基本过程?
• 数据库设计的前期基础(明确应用需求-应用边界) 完整的了解和刻画出未来数据库系统的功能应用与数据需求
(数据流图) • 数据建模阶段(概念设计)
• 选择数据模型,将需求转化为概念模型 • 模型修正(用户确认):核实是否满足企业的应用(功能)
需求,并不断完善概念模型。 • 逻辑结构设计阶段(逻辑设计)
{(e1, e2, … en) | e1 E1, e2 E2, …, en En}
where (e1, e2, …, en) is a relationship
• Example: (44553,22222) advisor
7
这里的联系集具 体是指什么关系 -table/lines?
Relationship Set advisor例子
• An entity is an object that exists and is distinguishable from other objects. • Example: specific person, company, event, plant
• Entities have attributes
4
二 实体联系模型(E-R模型)
2.1 实体集
对数据库结构 的描述应当包
括哪些方面? 有哪些客观对象, 以及相互间的联系!
Entity Sets
如何抽象地描 述客观对象的 内部结构?
• A database can be modeled as:
• a collection of entities, • relationship among entities.
• Relationships between more than two entity sets are rare. Most relationships are binary. (More on this later.)
Example: students work on research projects under the guidance of an instructor.
• Example: people have names and addresses
• An entity set is a set of entities of the same type that share the same properties.
• Example: set of all persons, companies, trees, holidays
第3部分:
课程名称: 数据库系统 --------------------
概念模型设计
教 师:朱征宇 单 位:重庆大学计算机学院
பைடு நூலகம்
提纲
• 数据库设计过程 • 实体联系模型 • 重复属性的处理 • 实体联系图 • 数据流图到ER图
2
一 数据库设计过程
数据库设计的 主要任务?
DBS设计&数据库设计
设计时的首要 难题是什么?
Example: 44553 (Peltier) student entity
爱因斯坦
advisor
22222 (Einstein)
relationship set instructor entity
• A relationship set is a mathematical relation among n 2 entities, each taken from entity sets
5
2.1 实体集
Entity Sets instructor and student 例子
instructor_ID, instructor_name
student-ID , student_name
6
2.2 联系集
如何抽象地描 述客观对象间
的关联?
Relationship Sets
• A relationship is an association among several entities
相关文档
最新文档