資料庫複習(一)
1. 資料庫基本概念
資料庫定義:資料庫是長期儲存在計算機中心,有組織的、可共享的大量資料的集合。
一、資料庫的基本特徵:
- 資料按一定的資料模型組織、描述和儲存
- 可為各種使用者共享
- 冗餘度較小
- 易擴充套件
二、資料庫管理系統:
定義:
- 位於使用者和作業系統之間的一層資料庫管理軟體
- 是基礎軟體,是一個大型複雜的軟體系統
主要功能:
- 資料操縱功能
- 資料庫的事務管理和執行管理
- 資料庫的建立和維護功能
三、資料庫系統
定義:在計算機系統中引入資料庫後的系統
構成:
- 資料庫
- 資料庫管理系統
- 應用系統
- 資料庫管理員

2. 資料庫管理技術的產生和發展
資料庫管理技術的三個發展階段:手工管理、檔案管理、資料庫管理
一、人工管理

二、檔案系統

三、資料庫系統

物理獨立性:指使用者的應用程式與儲存在磁碟上的資料庫中資料是相互獨立的。當資料的物理儲存改變了,應用程式不用改變。
邏輯獨立性:指使用者的應用程式與資料庫的邏輯結構是相互獨立的。資料的邏輯結構改變了,使用者程式也可以不變。
3. 資料模型
一、兩大類資料模型
概念模型:也稱資訊模型,是按使用者的觀點來對資料和資訊建模,用於資料庫設計。
邏輯模型和物理模型:
- 邏輯模型主要包括網狀模型、層次模型、關係模型、物件導向模型等, 按計算機系統的觀點對資料建模,用於DBMS實現。
- 物理模型是對資料最底層的抽象,描述資料在系統內部的表示方式和存取方法,在磁碟或磁帶上的儲存方式和存取方法。

二、ER圖
三要素:實體型,屬性和聯絡

三、層次模型

四、網狀模型

五、關係模型
用二維表表示實體及其聯絡。

四、資料庫模式
一、資料庫系統的三級模式
模式:資料庫中全體資料的邏輯結構和特徵的描述。
外模式:資料庫使用者使用的區域性資料的邏輯結構和特徵的描述,介於模式和應用之間,一個資料庫可以有多個外模式。
內模式:資料物理結構和儲存方式的描述,資料在資料庫內部的表示方式,一個資料庫只有一個內模式。

二、資料庫的二級映像
外模式/模式映像:定義了資料全域性邏輯結構和區域性邏輯結構之間的對應關係,保證資料的邏輯獨立性。
模式/內模式映像:定義了資料全域性邏輯結構和物理儲存結構之間的對應關係,保證資料的物理獨立性。
資料庫系統組成

本文由部落格群發一文多發等運營工具平臺 OpenWrite 釋出