数据库系统和信息管理知识复习——第一章数据库概述(Introduction)

目录:

0.前言

1.数据(Data)与信息(Information)

1.1数据库系统的组成

2.数据库系统与信息管理

2.1Manual Handling(人工处理)

2.2 File Systems(文件系统)

2.3 DatabaseSystem(数据库系统)

3.数据库的历史

3.1 1950s and early 1960s

3.2 Late 1960s and 1970s

3.3 1980s

3.4 1990s

3.5 2000s

3.6 2010s

4.数据库模型(Database Model)

4.1概念模型Conceptual Model

4.2 机器模型Machine Model

5.数据模式(Data Schemas)

6.数据库设计(DB Design)

7.数据库架构(Database Architecture)

7.1Traditional Two-Tier Client-Server

 7.2 Three-Tier Client-Server


0.前言

        本系列文章旨在记录数据库系统的知识点,可用于期末复习,笔者理解尚浅,文中不正之处静待批正。加粗高亮部分为重点。

1.数据(Data)与信息(Information)

  • 数据(Data):是符号(symbol),是事实(facts)、统计数字(statistics)、信息的载体(item of information),总是数字的(numeric)。
  • 数据库系统(Database system):是一个相互关联(interrelated)的数据及一些程序的集合(collection),允许用户访问(access)和修改(modify)这些数据,用于管理一个特定企业或组织大量的信息。

1.1数据库系统的组成

图1.数据库系统组成

1.DB(数据库)

有组织的数据集合,电子化的地存储、访问。

数据库中的数据是高价值的(highly valuable),拥有大量数据(relatively large)允许多用户访问,并且同时访问(accessed by multiple users and applications, often at the same time)

2.DBMS(数据库管理系统)

  • 数据库系统的核心(engine of DBS)
  • 是允许用户定义(define)创造(create)维护(maintain)控制访问(control)DB的软件系统。
  • DBMS的初始目的是方便(convenient)高效地(efficinet)存储检索DB的信息。
  • 系统软件
DBMS的功能:
  • A User-Accessible Catalog
  • Data Storage, Retrieval, and Update
  • Transaction Support
  • Concurrency Control Services
  • Recovery Services
  • Integrity Services
  • Services to Promote Data Independence
  • Authorization Services
  • Support for Data Communication
  • Utility Services
主要组成:
  • 存储管理器(Storage manager)——提供接口
  • 查询处理器(Query processing)
  • 事务管理器(Transaction manager)——保证DB的一致性(consistency)

3.DBAP(数据库应用)

比如bank,university

4.DBA(数据库管理员)

数据库与程序的核心控制者

Summary:不同的描述可能对应不同的意思。

  • 一系列相互关联的数据(collection of interrelated data )——DB
  • 用于访问数据的一组程序(set of programs)——DBMS
  • 一个对使用数据既方便又高效的环境(an environment)——DBAP

2.数据库系统与信息管理

数据的存储介质:
  • Paper tape(纸带)
  • Tape(磁带)
  • rotating disk(磁盘)
  • Flash memory(闪存)

数据库管理系统:

  • Manual Handling(人工处理)
  • File Systems(文件系统)
  • DatabaseSystem(数据库系统)

2.1Manual Handling(人工处理)

数据非持久性保留(not a persistent save)非共享(not shared)有大量冗余(large redundancy)不独立(not independent)完全依赖于程序(completely dependent on the program)

图2.人工处理

2.2 File Systems(文件系统)

数据持久性保留(persistent save)可共享(shared)仍有大量冗余(large redundancy)不独立(not independent)完全依赖于程序(completely dependent on the program)

图3.文件系统

使用文件系统存数据的缺点

1. Data redundancy and inconsistency(数据冗余和不一致)
Multiple file formats, duplication of information in different files
2. Difficulty in accessing data(数据访问困难,依赖于程序)
Need to write a new program to carry out each new task
例如:有数据文件存放某个学院的学生名单,已有程序能输出某个学院全体学生名单。现需要输出某学院某个教学班的学生名单。(这就需要添加新程序完成这个功能,或者人工从学院名单中筛选出班级名单)
File system is not a general ,efficient data retrieval system
3. Data isolation(数据隔离差,数据存放多个文件且多种格式,依赖于特定程序才能访问)
Multiple files and formats: If you want to access the data from multiple files, you need to write new applications to retrieve them.
4.Integrity problems(完整性问题)
Integrity constraints(对数据取值的约束)
例如:account balance > 0, become “buried” in program code rather than being stated explicitly , so it is hard to add new constraints or change existing ones.
5.Atomicity of updates(更新原子性问题)
Failures may leave data in an inconsistent state with partial updates carried out(数据部分修改可能导致不一致)
例如: Transfer of funds from one account to another should either complete or not happen at all
6.Concurrent access by multiple users(多用户并发访问问题)
Concurrent access needed for performance
Uncontrolled concurrent accesses can lead to inconsistencies
例如: Two people reading a balance (say 100) and updating it by withdrawing money (say 50 each) at the  same time
7.Security problems(安全性问题)
Hard to provide user access to some , but not all data.
例如:Because the entire file is always read for operation and there is no permission determination mechanism

2.3 DatabaseSystem(数据库系统)

数据持久性保留(persistent save)可共享(shared),只有少量冗余(little redundancy)独立(independent)完全不依赖于程序(completely not dependent on the program)

图4.数据库系统

3.数据库的历史

3.1 1950s and early 1960s

  • 使用磁带(Tapes provided only sequential access)

3.2 Late 1960s and 1970s

  • 使用硬盘直接访问数据(Hard disks allowed direct access to data)
  • 使用网络和分层数据模型(Network and hierarchical data models)
  • Ted Codd定义了关系数据模型(Ted Codd defines the relational data model)
  • 高性能事务处理(High-performance transaction processing)

3.3 1980s

  • SQL成为行业标准
  • 并行分布式数据库系统(Parallel and distributed database systems)
  • 面向对象的数据库系统(Object-oriented database systems)

3.4 1990s

  • 决策支持数据挖掘应用(Large decision support and data-mining applications)
  • 数据仓库(data warehouses)

3.5 2000s

  • 大数据存储系统(Big data storage systems),“NoSQL”系统
  • 大数据分析:超越SQL(Big data analysis: beyond SQL)

3.6 2010s

  • 分布式高可用(SQL front end to Map Reduce systems)
  • 模并行数据高性能(Massively parallel database systems)
  • 多核内存数据库高性能(Multi-core main-memory databases)

4.数据库模型(Database Model)

一个用于描述数据、数据关系、数据语义(semantic)及一致性限制(consistency constraints)的概念(conceptual)工具的集合。

目的:用易于理解的方式表示数据

组成:

  • 数据结构(structural part)
  • 数据操纵(manipulative part)
  • 完整性规则(possibly a set of integrity rules)

4.1概念模型Conceptual Model

实体关系数据模型

4.2 机器模型Machine Model

①Physical model
②Logical model
  • Hierarchical model
  • Network model
  • Relational model
  • Object-based data models (Object-oriented and Object-relational)
  • Semistructured data model (XML,JSON)
  • Unstructured model(graph, document) ……
a.Hierarchical Data model(分级数据模型)
图5.分级数据模型

 有且只有一个根结点(点没有双亲结点),根以外的其它只有一个双亲结点

b.Network Data Model(网络数据模块)

图6.网络数据模型

一个结点有多个双亲

c.Relational Model(关系模型)

关系模型是用 “表”(tables) 标识 数据和数据 系。
图7.关系模型

5.数据模式(Data Schemas)

隐藏数据结构的复杂性,以向用户表示数据库中数据的多个数据抽象级别。

schema:数据库的逻辑结构,类似于type

instance:数据库在特定时间点的实际内容,类似于value

三层模式:

①view level/external schema(视图模式/外模式)

数据库的局部视角(local view),能够看见和使用的局部数据的逻辑结构和特征的描述。

②logical level/conceptual schema(逻辑模式/模式/概念模式)

数据库的整体逻辑结构(overall logical structure),全体数据的逻辑结构和特征的描述,是所有用户的公共数据视图。

③physical level/internal schema(物理模式/存储模式/内模式)

数据库的整体物理结构(overall physical structure),数据再数据库系统内部的表示,对数据的物理结构和存储方式的描述。

Logical Data Independence(逻辑数据独立性)

外部模式不受概念模式变化的影响

例:概念模式改变不需要改变外部模式或重写应用程序

Physical Data Independence( 物理数据独立性)
概念模式不受内部模式变化的影响
例如:使用不同的文件组织,存储结构/设备不需要更改概念模式或外部模式

6.数据库设计(DB Design)

创建数据库:创建模式
数据库语言:
  • DDL: Data-Definition Language,用于创建模式 
  • DML: Data-Manipulation Language,用于插入、删除、更新数据

7.数据库架构(Database Architecture)

类型:
  • Centralized(集中式)
  • Client-server(用户—服务器式)
  • Parallel (multi-processor)(并行式)
  • Distributed(分布式)

7.1Traditional Two-Tier Client-Server

 7.2 Three-Tier Client-Server

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五倍子的代码空间

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值