1 基本概念
資料Data
資料庫DataBase
資料庫系統DataBaseSystem
資料庫管理系統DataBaseManageSystem
其中,資料庫系統DBS = 資料庫DB + 資料庫管理系統DBMS+User/Administrators
2發展曆程
- 資料庫發展:人工管理>>檔案系統>>資料庫系統
- 資料庫系統和檔案系統根本差別:資料的結構化
- 用檔案系統的缺陷(這些缺陷database system都解決了w)
- Data redundancy and inconsistency
- Difficulity in accessing data
- Data isolation
- Integrity problems
- Atomicity of updates
- Concurrent access by multiple users
- Security problems
3 三層schema兩層映射
- 視圖層 View Level->Conceptual schema
- 某一使用者能看到和處理的資料,是全局資料的一部分
- ER 模型
||E-C mapping映射
- 邏輯層 Logical Level->Logical schema
- 從全局角度了解/管理資料,包括相應關系限制
- 關系模型
- 網狀模型,層次模型,基于對象的資料模型,半結構化資料模型等等
||C-I mapping映射
- 實體層 Physical level->Physical schema
- 對資料最底層的抽象。描述存儲在媒體上的資料,包括存儲路徑,存儲方式,etc.
- B*樹模型
其中兩層映射從下向上分别保證了兩個獨立性——
- 實體資料獨立性
- 使用者的應用程式和資料庫中資料的實體存儲互相獨立
- 當實體存儲改變,使用者應用程式不受影響
- 邏輯資料獨立性
- 使用者應用程式與資料庫邏輯結構互相獨立
- 當資料邏輯結構改變,應用程式不改變。
4 資料庫的功能
- 使用者的角度
- 資料庫定義功能——DDL
- 資料庫管理功能——DML
- Procedural DML
- User specifies what data is required and how to get these data
- Declarative DML
- User specifies what data is required without specifying how to get those data
- Procedural DML
- 資料庫維護——DBA
- 系統的角度