数据库复习提纲
概述
基本概念
数据库:DB
数据库管理系统:DBMS
数据库系统:DBS
元数据:metadata
数据字典:data dictionary
两种数据管理方法
- file system method
- database method
drawback of the file system
Data redundancy and inconsistency(数据冗余和不一致性)
Difficulty in accessing data(访问数据困难)
Data isolation — multiple files and formats (数据孤立)
Integrity problems(完整性问题)
Atomicity problem(原子性问题)
Concurrent- access anomaly(并发访问异常)
Security problem(安全性问题)
数据模型(data model)
三要素:
- Data Structure (数据结构)
- Data Constraints (数据约束)
- Data Operations(数据操作)
数据模型分类:
- 概念数据模型(conceptual data model) (高层模型)
- a. 实体联系模型(entity-relationship model)
- entity,attribute,relationship
- 对象数据模型(object data model)
- 类:泛化,关联,依赖,实现
- 对象:类的实例,链接,聚合
- a. 实体联系模型(entity-relationship model)
- 表示型或实现型模型:中间层模型
关系数据模型(rational data model)目前主要的数据库模型
网状模型(network model) 已经过时
层次模型(hierarchical model) 已经过时 - 物理数据模型(physical data model):低层模型
Three-Schema Architecture and Data Independence
- 外模式(external schema)
- 概念模式(conceptual schema)
- 内模式(internal schema)
两级映射(mapping)
Database Instance and Database Schema
数据库模式(Database Schema)
数据库的描述是数据库模式
数据库模式也称为数据库的内涵(Database Intension)
数据库模式是在设计过程中指定的,不会经常改变!
数据库实例(Database Instance)
某一时刻数据库中的数据是数据库实例
数据库实例也称为数据库的外延(Database extension)
数据库实例也称为数据库的状态(Database State)
数据库实例会经常发生变化(对数据库的CRUD操作!)
数据库语言
-
数据操纵语言 (Data Manipulation Language , DML)
- 过程化 DML (procedural DML) :要求用户指定需要什么数据以及如何获得这些数据
- 声明式 DML (declarative DML): 也称为非过程化 DML ,只要求用户指定需要什么数据, 而不指明如何获得这些数据
-
数据定义语言(Data-Definition DQJ Language , DDL)
consitency constraint
Domain Constraints
Referential Integrity
Assertions(每个学期一个系至少开设5门课)
Authorization
Transaction Management(事务管理)
transaction:a collection of operations that performs a single logical function in a database application
Transaction-management compon