Professional Documents
Culture Documents
BISM7206期中知识点整理 PDF
BISM7206期中知识点整理 PDF
Week 1 Objectives
By the end of this lecture, you should be able to:
• Understand the difference between files vs databases-了解文件与数据
库之间的区别
• Understand the key concepts of a database-了解数据库的关键概念
• Describe the functions of a DBMS-描述 DBMS 的功能
• Understand the purpose of three-level database architecture.- 了解三级
数据库体系结构的用途。
•
1. File-based systems
Collection of application programs that perform services for the end users (e.g.
除
删
reports).
请
为最终用户提供服务的应用程序集合(例如报告)
人
个
Each program defines and manages its own data. 每个程序定义并管理自己的数据。
或
构
机
TERM DEFINITION 他
其
,
Data Raw facts, such as a telephone number, a birth date, a customer name, and a year-to-date (Y TD) sales value. Data have
用
使
little meaning unless they have been organized in some logical manner.原始事实,例如电话号码、出生日期、客户
费
姓名和年初至今(Y TD)销售价值。除非以某种逻辑方式组织数据,否则它们几乎没有意义。
免
学
Field A character or group of characters (alphabetic or numeric) that has a specific meaning. A field is used to define and
同
store
uq
名)。
仅
,
Record
A logically connected set of one or more fields that describes a person, place, or thing. For example, the fields that
料
资
constitute a record for a customer might consist of the customer's name, address, phone number, date of birth, credit
程
能包括客户的姓名、地址、电话号码、出生日期、信用额度和未付余额。
sm
bi
File
考
A collection of related records. For example, a file might contain data about the students currently enrolled at UQ.相关
参
记录的集合。例如,一个文件可能包含当前在 UQ 注册的学生的数据。
容
内
,
3. The Database
Shared collection of logically related data (and a description of this data), stored in a
single logical data repository 逻辑相关数据(以及该数据的描述)的共享集合,
存储在单个逻辑数据存储库中 A database is designed to meet the information needs
除
删
请
人
个
策
或
构
机
5. Database System vs File System
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
理
整
生
学
uq
建数据库的目的是:
构
Manage data efficiently and effectively to enable easy, timely, informative and accurate
机
他
access
其
数据。
使
费
免
学
同
uq
供
仅
程
课
sm
bi
考
参
We know that a database is a shared collection of logically related data designed to meet the
容
information needs of an organisation.Therefore, we must analyse the information needs of users,
内
,
understand the data, and identify the logical relationships within the data.Then, we can design a
理
共享集合,旨在满足组织的信息需求。因此,我们必须分析用户的信息需求,了解数据,
生
并确定数据中的逻辑关系。然后,我们可以设计一个结构良好的数据库,以满足用户的需
学
求.
uq
除
Hardware - Can range from a PC to a network of computers (depends on the
删
请
organisation‘s requirements and the DBMS used).硬件——可以是 PC,也可以是
人
计算机网络(取决于组织的要求和使用的 DBMS)。
个
application programs.软件——数据库管理系统、操作系统、网络软件(如有必要)和应用程
机
序。
他
其
组织使用的数据和对数据(元数据)的描述。
用
使
Procedures - Instructions and rules that should be applied to the design and use
费
和规则。
学
同
数据库管理员、数据管理员
仅
,
料
database.所有规格都存储在数据库中。
容
内
内部映射的目的。
请
人
Database design should provide users with an abstract view of data 数据库设计应该
用
为用户提供数据的抽象视图
使
费
图
学
同
Therefore, database design must provide an abstract and general description 因此,
uq
数据库设计必须提供抽象和一般的描述
供
中所做更改的影响
料
理数据库存储的详细信息。
程
课
sm
bi
考
参
容
内
,
理
整
生
除
删
请
人
个
或
构
机
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
External (logical) : Individual users ’ view of the database ; Describes that part of
课
Conceptual (logical) : Community view of the database i.e. logical view of the whole
bi
考
stored in the database and the relationships among the data e.g. constraints and
容
内
和完整性信息。
理
整
Describes how data is stored in the database e.g. storage space allocation, indexes,
学
描述数据如 何 存储在数据库中,例如存储 空 间分
配 、 索引 、数据 压缩 、加 密 。
17. Schemas overall description of the database (but it is not the actual data)数据库
的总体描述
(但不是实际数据)
Specified during the database design 在数据库设计期间指定
Should not change often 不应该经常改变
Consists of 3 different types of schema 由 3 种不同类型的模式组成
18. Three Types of Database Schema 三种数据库模式
Defined according to the levels of abstraction of the three-level architecture 根据三层
架构的抽象级别定义
External schema (sometimes called subschema) – 外部模式(有时称为子模式) highest
level of abstraction 最高层次的抽象
may be several external schemas (different user views) 可能有多个外部架构(不同
的用户视图)
Conceptual schema 概念图式
除
Describes entities, attributes, relationships, constraints 描述实体、 属 性、关系和 约
删
束
请
人
Internal schema 内部模式
个
Lowest level of abstraction 最 低抽象层次
或
构
Description of internal model e.g. storage space allocation, indexes, data compression,
机
encryption 描述内部模型,例如存储 空 间分 配 、 索引 、数据 压缩 、加 密
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
Integrated collection of concepts for describing data, relationships between data, and
生
数据 约束 的集 成 概念集合。
A high -level description of the database & is understa ndable by a variety of users. 对
数据库的高级描述 & 各种用户 都 能理解。
A data Model comprises:数据模型包括:
• a structural part;结构部件;
• a manipulative part;操纵的部分;
• possibly a set of integrity rules 可能是一套完整性规则
定格式记录 :
除
Relational Data Model 关系数据模型
删
Network Data Model 网络数据模型
请
人
Hierarchical Data Model. 分 层 数据模型。
个
Physical Data Models 物 理数据模型
或
构
机
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
理
整
生
学
uq
Week 2 DB System Development Lifecycle & DB Analysis - Ch 10 &11 Objectives:
Understand the Database Development Lifecycle.
Understand the main phases of database design: conceptual, logical, and physical
design.
Understand fact-finding.
除
传播信息的资源。
删
Computer-based IS includes:基于计算机的 IS 包括:
请
人
Application software; Database software;应用软件;数据库软件
个
Computer hardware;计算机硬件;
或
构
People – system users, system developers.系统用户、系统开发人员。 Database
机
System:
他
其
Database is a fundamental component of IS,数据库是信息系统的基本组成部分
,
的角度来看待
免
学
同
IS 的生命周期与其支持的数据库系统的生命周期相关联
仅
,
料
阶段。
sm
bi
考
system, including the major user views, its users, and application areas.指定数据
容
内
库系统的范围和边界,包括主要用户视图、用户和应用程序区域。
,
理
求
uq
除
删
请
data conversion and loading,数据转换和加载:Loading data from the old system
人
to the new system and, where possible, converting any existing applications to run
个
on the new database.将数据从旧系统加载到新系统,并在可能的情况下,将任何现有应用
或
构
程序转换为在新数据库上运行。
机
他
其
testing,测试:Database system is tested for errors and validated against the。
,
指定的要求进行验证。
费
免
学
requirements are incorporated into the database system through the preceding
供
必要时,通过生命周期的前几个阶段将新需求合并到数据库系统中。
料
资
程
课
System Definition describes scope and boundaries of database system & the major
user views.描述数据库系统的范围和边界以及主要的用户视图。
删
请
人
1. Data Modelling
个
Data model is a graphical abstract representation of the data requirements; 数据
或
构
模型是数据需求的 图形抽象表示
机
Assists in understanding the meaning (semantics) of the data; 帮助 理解数据的
他
其
含 义( 语 义) ;
,
Facilitates communication about the information requirements; 促 进有关信息
用
使
需求的 沟 通 ; 费
Give an overall view of the database; 给出 数据库的 总 体 视图;
免
2. Database Design
资
程
除
Logical structure (describes relations & constraints);逻辑结构(描述关系
删
和约束);
请
人
DBMS is known so we know the specific data model (e.g. relational);
个
DBMS 是已知的,因此我们知道特定的数据模型(例如关系型)
或
构
Independent of physical considerations such as storage;独立于物理因
机
素,如存储;
他
其
测试和验证;
用
模型被标准化以测试正确性并消除数据冗余
免
学
同
DBMS 是已知的,因此我们知道特定的数据模型(例如关系型);
料
i. file organizations,档案组织,
课
ii. indexes,索引,
sm
design.主要目的是描述如何物理实现逻辑数据库设计。
容
内
,
Part 3 Fact-finding
理
1. Fact-finding
整
生
Critical to capture the necessary facts to build the required database application;
学
除
更 详细 的 关于 每种 方式 的 优缺 点 和 何 时 使用 参 考 text book ch. 11.3
删
请
人
个
或
构
机
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
理
整
生
学
uq
Brainstorming
WEEK 3 Entity-Relationship Modelling - Ch 12 & Ch 13
Objectives
Understand the purpose & importance of using entity-relationship (ER) modelling
in a business environment.
Explain the entity-relationship diagram (ERD):
Build an ER model from a requirements specification.
Appreciate the limitations of the ER model.
Understand the concept of specialisation/generalization.
除
删
请
2. Main components of ER Model : Entities, Relationships, Attributes
人
a. Entities: 个
或
Entity type:
构
机
occurrence 指的是实体集,而不是单个实体引用
使
费
的唯一可标识对象
学
b. Relationships
仅
,
Relationship type:
料
资
与的方式
bi
考
短语表示(例如,works at)
内
,
Attribute Types:
`Single-valued Attribute 单值属性:Has a single value for each entity
occurrence;每个实体引用都有一个值 Sometimes called ‘atomic’
attributes (e.g. studentID).有时被称为“原子”属性(例如 studentID, last
name ,fierst name)。
料
(alternate key/secondary key).唯一标识实体的最小属性集(备用键/辅助
资
键)
程
课
Primary Key - Candidate key selected to uniquely identify an entity.选择候
sm
选密钥以唯一标识实体。
bi
Composite Key - Candidate key that consists of two or more. attributes.由两
考
参
个或多个属性组成的候选密钥。
容
内
,
理
整
生
学
uq
4. Strong/Weak Entities
Strong Entity: Existence is independent of other entity types i.e. it can exist
apart from all its related entities. 存在独立于其他实体类型,即它可以独立
于所有相关实体而存在。
Weak Entity: Existence is dependent on another entity type i.e. it only exists.
when it is associated with another related entity occurrence. 存在依赖于另一
个实体类型,即仅当它与另一个相关实体关联时才存在。Primary key is
partially or totally derived from parent entity 主键部分或全部来自父实体
5. Strong/Weak Relationships
Weak ( non -identifying) relationship : Primar y key of the related entity does .
not contain a primary key component of the parent entity 相关实体的 主 键不
包含 父 实体的 主 键组件
Strong (identifying) relationship : Primary key of the related entity contains a .
primary key component of the parent entity 相关实体的 主 键 包含 父 实体的
主 键组件
Part 2:Structural Constraints
1. Structural Constraints 结构约束
Based on business rules;基于商业规则;
Relate to entities that participate in a relationship;与参与关系的实体相关;
Restrictions on relationships should reflect the ‘real world’;对关系的限制应该反
映“现实世界”;E.g. a car must have an owner, a student can only have one Date
of Birth; Main type of constraint is called “Multiplicity”.约束的主要类型称为
除
删
请
人
个
或
构
机
他
其
,
用
使
费
免
7. Developing an ER Diagram
Create a detailed narrative of the organisation’s description of operations 对
组织的运营进行详细描述
Identify main entities and relationships 确定主要实体和关系
Identify business rules (constraints)
确定业务规则(约束)
Develop the initial ER Diagram including relationships based on the rules 开
发初始 ER 图,包括基于规则的关系
Identify the attributes and primary keys that adequately describe the entities
确定适当描述实体的属性和主键
Revise and review ER Diagram – it is an iterative process 修订和审查
除
删
ER 图——这是一个迭代过程
请
人
个
Part 3 Enhanced ER Modelling
或
构
机
1. Enhanced ER Model
他
EER modelling enables for more complex situations; EER 建模可用于
更复杂的情况; 其
,
用
模概念;
费
免
EER 模型最有用的补充是专门化/泛化。
uq
供
仅
2. Specialisation / Generalization
,
Superclass
料
资
Entity type;
程
Distinct subgrouping.不同的亚组。
bi
子类中
学
的实体表示与超类中相同的“真实世界”对象,并且可能具有子类特定的属性,以
uq
及与超类关联的属性。
Specialisation 专业化: Process of maximizing differences between.
members of an entity by identifying their distinguishing characteristics.
通过识别实体成员的显著特征,最大化其差异的过程。
Generalisation:Process of minimising differences between entities by
identifying their common characteristics.通过识别实体间的共同特征来
最小化实体间差异的过程。
3. Constraints on Specialization/Generalization
a. participation constraints :
Shows whether ev ery member in superclass must also participate as a
member of a subclass.
May be mandatory or optio nal .
b. disjoint constraints
Indicates whether member of a s uperclass can be a member of one, or
more than one, subclass.
May be disjoint (can be member of only one subclass) or nondisjoint
(entity may be member of more than one subclass).
nondisjoint:{optional , and}
除
删
请
人
个
或
构
机
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
理
整
生
学
uq
Objectives
• Understand the terminology and structure of the relational model;
• General awareness of the connection between mathematical relations and
relations in the relational model;
除
• Describe views and their importance
删
• Apply relational model concepts to a simple database.
请
人
个
Part 1: Structure of the relational model
或
构
1. The Relational Database Management System (RDMS)
机
A Relational Database is: a collection of normalised relations ; Normalisation ; For
他
其
now, consider a normalised relation to be a table composed of rows and columns
,
where each cell contains a single value.
用
使
费
2. Major commercia l relational database products include : Oracle ;DB2 (IBM) ;SQL
免
Server ;MySQL
学
同
uq
5. Relational Terminology
bi
sm
课
程
资
料
,
仅
供
uq
同
学
免
费
使
用
,
其
他
机
构
或
个
人
请
删
除
All data is logically structured within relations (tables) 所有数据都在关系
(表)中进行逻辑结构
A relation is a table with columns/attributes and rows/tuples 关系是包含列/
属性和行/元组的表
Each relation has a name 每个关系都有一个名字
除
Each tuple is a row of a relation & contains one value per attribute
删
每个 元 组是一个关系的一行,每个 属 性 包含 一个 值
请
人
个
或
构
机
他
其
,
用
使
费
免
学
同
uq
供
仅
,
料
资
程
课
sm
bi
考
参
容
内
,
理
整
生
学
uq
除
d. Alternate key
删
请
e. Foreign key 人
f. Composite key
个
g. Secondary key
或
构
机
The concept of Cartesian products applies to databases. That is, flexibility can
费
record from each initial table with each record of all other initial tables of
学
同
A x B = {(1, 0), (1, 2), (1, 4), (3, 0), (3, 2), (3, 4)}
资
A x B x C = {(1, 0, j), (1, 2, j), (1, 4, j), (3, 0, j), (3, 2, j), (3, 4, j), (1, 0, k), (1,
课
May specify which pairs are in relation using some condition for selection;
容
内
y = }1
S ={(x y x D y D, ) | Î Î, , and x=
2y}
1 2