數(shù)據(jù)庫原理(雙語)-實驗課講Chapter02_第1頁
數(shù)據(jù)庫原理(雙語)-實驗課講Chapter02_第2頁
數(shù)據(jù)庫原理(雙語)-實驗課講Chapter02_第3頁
數(shù)據(jù)庫原理(雙語)-實驗課講Chapter02_第4頁
數(shù)據(jù)庫原理(雙語)-實驗課講Chapter02_第5頁
已閱讀5頁,還剩55頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、Chapter 2 Database Environment(數(shù)據(jù)庫環(huán)境數(shù)據(jù)庫環(huán)境)2.1 The Architecture of Database Systems2.2 Database Languages2.3 Data Models & Conceptual Modeling 2.4 Functions of a DBMS2.5 Components of a DBMS2.6 Multi-User DBMS Architectures2.1 The Architecture of Database SystemsnEarly 2-level architecture, DBTG(

2、Data Base Task Group), 1971:a system view(schema) (1個系統(tǒng)視圖個系統(tǒng)視圖(模式模式) n user views (subschemas) (n個用戶視圖個用戶視圖(子模式子模式)n3-level architecture, ANSI(American National Standards Institute) SPARC(Standards Planning and Requirements Committee), 1975:a physical view(internal schema) (1個物理視圖個物理視圖(內(nèi)模式內(nèi)模式) a con

3、ceptual view(conceptual schema) (1個概念視圖個概念視圖(概念模式概念模式) n user views (external schemas) (n個用戶視圖個用戶視圖(外模式外模式) nSchema means the description of data (“模式模式”意為意為“數(shù)據(jù)的描數(shù)據(jù)的描述述”).2.1 The Architecture of Database SystemsANSI-SPARC three-level architecture of DBS2.1 The Architecture of Database Systems1. Exte

4、rnal Level2. Conceptual Level3. Internal Level4. Schemas, Mappings, and Instances5. Data Independence1. External LevelnConsists of multiple user views (external schemas) of the DB (由多個數(shù)據(jù)庫用戶視圖由多個數(shù)據(jù)庫用戶視圖(外模式外模式)構(gòu)成構(gòu)成: 解決解決需要使用哪些數(shù)據(jù)需要使用哪些數(shù)據(jù)的問題的問題). Each user view includes the part of DB relevant to the u

5、ser (每個用戶視圖包含與該每個用戶視圖包含與該用戶相關(guān)的數(shù)據(jù)庫部分用戶相關(guān)的數(shù)據(jù)庫部分).Users are unaware of what is out of their views (用戶感覺不到其視圖以外的數(shù)據(jù)用戶感覺不到其視圖以外的數(shù)據(jù)).Different views may have different representations of the same data (相同數(shù)相同數(shù)據(jù)在不同視圖中可能有不同的表示據(jù)在不同視圖中可能有不同的表示).2.1 The Architecture of Database Systems1. External Level2. Concept

6、ual Level3. Internal Level4. Schemas, Mappings, and Instances5. Data Independence2. Conceptual LevelnConsists of a conceptual schema of DB (What should be stored?) (由一個數(shù)據(jù)庫由一個數(shù)據(jù)庫概念模式概念模式構(gòu)成構(gòu)成, 包含整包含整個數(shù)據(jù)庫應(yīng)存儲的數(shù)據(jù)個數(shù)據(jù)庫應(yīng)存儲的數(shù)據(jù). 解決解決應(yīng)該存應(yīng)該存儲哪些數(shù)據(jù)儲哪些數(shù)據(jù)的問題的問題).contains logical representation of the entire DB, whi

7、ch includes (包包含整個數(shù)據(jù)庫的邏輯表示含整個數(shù)據(jù)庫的邏輯表示, 包括包括):all entities, their attributes, and their relationships;constraints on data;security & integrity info.supports each user view, in which any data must be contained in, or derived from, the conceptual schema (支持每個用戶視圖支持每個用戶視圖, 其中的其中的任何數(shù)據(jù)都必須源自概念模式任何數(shù)據(jù)都必須

8、源自概念模式).must not contain any storage-dependent details (概念模式中不應(yīng)概念模式中不應(yīng)包含任何數(shù)據(jù)存儲細(xì)節(jié)包含任何數(shù)據(jù)存儲細(xì)節(jié)).2.1 The Architecture of Database Systems1. External Level2. Conceptual Level3. Internal Level4. Schemas, Mappings, and Instances5. Data Independence3. Internal LevelnConsists of an internal schema of DB (How

9、to store data?) (由一個由一個數(shù)據(jù)庫數(shù)據(jù)庫內(nèi)模式內(nèi)模式構(gòu)成構(gòu)成, 解決解決如何存如何存儲數(shù)據(jù)儲數(shù)據(jù)的問題的問題).contains physical representation of the DB, which includes (包含包含數(shù)據(jù)庫的物理表示,包括數(shù)據(jù)庫的物理表示,包括):storage space allocation for data and indexes (為數(shù)據(jù)和索為數(shù)據(jù)和索引引分配分配存儲空間存儲空間)record description for storage (記錄的記錄的存儲描述存儲描述);record placement (記錄的記錄的存存放

10、安排放安排);data compression & encryption (數(shù)據(jù)數(shù)據(jù)壓縮壓縮和和加密加密).3. Internal LevelBelow the internal level there is a physical level, managed by OS and used by DBMS (內(nèi)模式之下是一個內(nèi)模式之下是一個物理層物理層, 它由它由OS管理管理, 由由DBMS使用使用), in which functions of DBMS and OS are not clear-cut (其中其中, DBMS和和OS在功能上并沒有嚴(yán)格界限在功能上并沒有嚴(yán)格界限).

11、Some DBMSs use many access methods of OS (很多很多DBMS直接利用直接利用OS提供的數(shù)據(jù)存取方法提供的數(shù)據(jù)存取方法(文件系統(tǒng)文件系統(tǒng)), while others create their own file organizations (而另一些而另一些DBMS則創(chuàng)則創(chuàng)建自己的文件組織建自己的文件組織).physical level consists of items only OS knows, such as (物理層由只有物理層由只有OS知道的項目構(gòu)成,例如知道的項目構(gòu)成,例如):how to realise sequencing (如何實現(xiàn)如何

12、實現(xiàn)先后順序先后順序),whether fields of records are stored contiguously on disk (記錄字段是否記錄字段是否連續(xù)存放在磁盤上連續(xù)存放在磁盤上).2.1 The Architecture of Database Systems1. External Level2. Conceptual Level3. Internal Level4. Schemas, Mappings, and Instances5. Data Independence4. Schemas, Mappings, and InstancesnSchema means th

13、e description of data (“模式模式”的含義是的含義是“數(shù)據(jù)的描述數(shù)據(jù)的描述” ) nFor a DB, there are (一個數(shù)據(jù)庫有一個數(shù)據(jù)庫有):multiple external schemas(or subschemas) (多個外模式或子模式多個外模式或子模式), one conceptual schema(or schema) (一個概念模式或模式一個概念模式或模式), one internal schema (一個內(nèi)模式一個內(nèi)模式),nDBMS is responsible for mapping between these three types of

14、 schema (DBMS負(fù)責(zé)實現(xiàn)這三類模式之間的負(fù)責(zé)實現(xiàn)這三類模式之間的映射映射).nMapping means transformation of data (映射映射的含義是的含義是數(shù)據(jù)數(shù)據(jù)轉(zhuǎn)換轉(zhuǎn)換).4. Schemas, Mappings, and InstancesnFor a DB, there are two types of mapping (數(shù)據(jù)庫中有兩類映射數(shù)據(jù)庫中有兩類映射): one conceptual/internal mapping ( 一個一個概念模式概念模式/內(nèi)模式映射內(nèi)模式映射);multiple external/conceptual mappings

15、(多個多個外模式外模式/概念模式映射概念模式映射).4. Schemas, Mappings, and InstancesnExample of the different levels: 4. Schemas, Mappings, and InstancesnIt is important to distinguish between (注意區(qū)分下列兩個概念注意區(qū)分下列兩個概念)the description of the DB (數(shù)據(jù)庫的數(shù)據(jù)庫的描述描述)and the data in the DB (數(shù)據(jù)庫中的數(shù)據(jù)庫中的數(shù)據(jù)數(shù)據(jù)).nThe description of the DB i

16、s the DB schema(intension, 內(nèi)涵內(nèi)涵) (數(shù)數(shù)據(jù)庫描述就是數(shù)據(jù)庫模式據(jù)庫描述就是數(shù)據(jù)庫模式(又稱又稱內(nèi)涵內(nèi)涵), which is specified during database design process (它是在它是在數(shù)據(jù)庫設(shè)計過程中定義的數(shù)據(jù)庫設(shè)計過程中定義的), and does not change frequently. (且不會頻繁變化且不會頻繁變化)The data in the DB may change frequently (而數(shù)據(jù)庫中的而數(shù)據(jù)庫中的數(shù)據(jù)通常會頻繁變化數(shù)據(jù)通常會頻繁變化)nThe data in DB at a time i

17、s called a DB instance(extension, 外延外延) (某個時刻存放在數(shù)據(jù)庫中的數(shù)據(jù)被稱為一個某個時刻存放在數(shù)據(jù)庫中的數(shù)據(jù)被稱為一個數(shù)據(jù)庫實例數(shù)據(jù)庫實例).Many DB instances can correspond to the same DB schema (多個數(shù)據(jù)庫實例能夠?qū)?yīng)同一個數(shù)據(jù)庫模式多個數(shù)據(jù)庫實例能夠?qū)?yīng)同一個數(shù)據(jù)庫模式). 2.1 The Architecture of Database Systems1. External Level2. Conceptual Level3. Internal Level4. Schemas, Mapping

18、s, and Instances5. Data Independence5. Data IndependencenLogical Data Independence (邏輯數(shù)據(jù)獨立性邏輯數(shù)據(jù)獨立性) refers to immunity(免疫免疫) of external schemas to changes in conceptual schema (指外模式對概念模式變化的指外模式對概念模式變化的免疫免疫:概念模式變化不影響外模式概念模式變化不影響外模式). Conceptual schema changes should not require to modify external sc

19、hema or application programs (概念模式變化概念模式變化時不必修改外模式和應(yīng)用程序時不必修改外模式和應(yīng)用程序). This is guaranteed by external/conceptual mappings (邏邏輯數(shù)據(jù)獨立性由外模式輯數(shù)據(jù)獨立性由外模式/概念模式映射保證概念模式映射保證).5. Data IndependencenPhysical Data Independence (物理數(shù)據(jù)獨立性物理數(shù)據(jù)獨立性) refers to immunity(免疫免疫) of conceptual schemas to changes in internal s

20、chema. (指概念模式對內(nèi)模式變化指概念模式對內(nèi)模式變化的的免疫免疫: 內(nèi)模式變化不影響概念模式內(nèi)模式變化不影響概念模式). Internal schema changes should not require to modify conceptual or external schemas (內(nèi)模式變化時不必修改內(nèi)模式變化時不必修改概念模式和外模式概念模式和外模式). This is guaranteed by conceptual/internal mapping (物物理數(shù)據(jù)獨立性由概念模式理數(shù)據(jù)獨立性由概念模式/內(nèi)模式映射保證內(nèi)模式映射保證).5. Data Independenc

21、enData Independence and the 3-Level Architecture (數(shù)據(jù)獨立數(shù)據(jù)獨立性和三層體系結(jié)構(gòu)性和三層體系結(jié)構(gòu))Chapter 2 Database Environment(數(shù)據(jù)庫環(huán)境數(shù)據(jù)庫環(huán)境)2.1 The Architecture of Database Systems2.2 Database Languages2.3 Data Models & Conceptual Modeling 2.4 Functions of a DBMS2.5 Components of a DBMS2.6 Multi-User DBMS Architecture

22、s2.2 Database Languageshigh-level programming languages(C+, Java, VB, Delphi, etc.)data sublanguageDDLused to specify DB schemaDMLused to read and update DBdoes not include conditional or iterative statements. not fit for programming. One method is extend these statements into DML, E.g., SQL ServerA

23、nother method is embedding the sublanguage into a high-level programming puting languages2.2 Database Languages1. Data Definition Language (DDL)2. Data Manipulation Language (DML) 3. Procedural DML 4. Non-Procedural DML5. Fourth Generation Language (4GL)1. Data Definition Language (DDL)nData Definit

24、ion Language (DDL) Allows the DBA or user to describe and name entities, attributes, and relationships required for the app (DBA或用戶用或用戶用DDL描述描述并并命名命名應(yīng)用系統(tǒng)所需的應(yīng)用系統(tǒng)所需的實體實體、屬性屬性和和聯(lián)系聯(lián)系), plus any associated integrity and security constraints (也用來描述并命名也用來描述并命名完整性完整性、安全性安全性約束約束). nDDL is used to define a DB

25、 schema, or to modify an existing one (DDL用來定義或修改數(shù)據(jù)庫模式用來定義或修改數(shù)據(jù)庫模式).nThe result of executing DDL statements is object definitions stored in system catalog (data dictionary, data directory) (DDL語句的語句的執(zhí)行結(jié)果執(zhí)行結(jié)果是存儲在是存儲在系統(tǒng)目系統(tǒng)目錄錄(數(shù)據(jù)字典、數(shù)據(jù)目錄數(shù)據(jù)字典、數(shù)據(jù)目錄)中的對象定義中的對象定義).2.2 Database Languages1. Data Definition La

26、nguage (DDL)2. Data Manipulation Language (DML) 3. Procedural DML 4. Non-Procedural DML5. Fourth Generation Language (4GL)2. Data Manipulation Language (DML) nData Manipulation Language (DML) Provides basic data manipulation operations on data stored in the database (提供針對數(shù)據(jù)庫中數(shù)據(jù)的基提供針對數(shù)據(jù)庫中數(shù)據(jù)的基本本數(shù)據(jù)操縱操作

27、數(shù)據(jù)操縱操作).nData manipulation operations usually include (數(shù)據(jù)操數(shù)據(jù)操縱操作通常包括縱操作通常包括): insertion of new data into the database (向數(shù)據(jù)庫向數(shù)據(jù)庫插插入入新數(shù)據(jù)新數(shù)據(jù)); modification of data stored in the database (修改修改存存放在數(shù)據(jù)庫中的數(shù)據(jù)放在數(shù)據(jù)庫中的數(shù)據(jù)); retrieval of data contained in the database (在數(shù)據(jù)庫在數(shù)據(jù)庫中中查詢查詢所需數(shù)據(jù)所需數(shù)據(jù)); deletion of data f

28、rom the database (刪除刪除數(shù)據(jù)庫中的數(shù)據(jù)庫中的數(shù)據(jù)數(shù)據(jù)).nThe part of a DML that involves data retrieval is called a query language. (DML中涉及數(shù)據(jù)查詢的部分被稱為中涉及數(shù)據(jù)查詢的部分被稱為查詢語言查詢語言)2.2 Database Languages1. Data Definition Language (DDL)2. Data Manipulation Language (DML) 3. Procedural DML 4. Non-Procedural DML5. Fourth Generat

29、ion Language (4GL)3. Procedural DML nProcedural DML (過程化過程化DML) allows the user to tell the system what data is needed and exactly how to retrieve the data. (使用過程化使用過程化DML時時, 用戶須告訴系統(tǒng)用戶須告訴系統(tǒng)“需要什么數(shù)據(jù)需要什么數(shù)據(jù)”以及以及“如何獲取這些數(shù)據(jù)如何獲取這些數(shù)據(jù)”) The user must express all the data access operations by calling proper pr

30、ocedures (用戶必須調(diào)用恰當(dāng)?shù)挠脩舯仨氄{(diào)用恰當(dāng)?shù)倪^程來表達所有的數(shù)據(jù)存取操作過程來表達所有的數(shù)據(jù)存取操作). Typically, procedural DMLs are embedded in a high-level programming language (過程化過程化DML常被常被嵌入某種高級編程語言中使用嵌入某種高級編程語言中使用). Network and hierarchical DMLs are normally procedural (see Section 2.3) (網(wǎng)狀網(wǎng)狀和和層次層次DML通常通常是過程化的是過程化的, 見見2.3節(jié)節(jié))2.2 Databas

31、e Languages1. Data Definition Language (DDL)2. Data Manipulation Language (DML) 3. Procedural DML 4. Non-Procedural DML5. Fourth Generation Language (4GL)4. Non-Procedural DML nNon-Procedural DML (非過程化非過程化DML) allows user to state what data is needed, rather than how it is to be retrieved. (使用非過程化使用

32、非過程化DML時時, 用用戶只須告訴系統(tǒng)戶只須告訴系統(tǒng)“需要什么數(shù)據(jù)需要什么數(shù)據(jù)”, 而無需知道而無需知道“如何獲取這些數(shù)據(jù)如何獲取這些數(shù)據(jù)”) frees user from having to know details of DBS, thus ensuring data independence. (用戶不必知道數(shù)據(jù)庫用戶不必知道數(shù)據(jù)庫系統(tǒng)的細(xì)節(jié),保證了數(shù)據(jù)獨立性系統(tǒng)的細(xì)節(jié),保證了數(shù)據(jù)獨立性) easier to learn & use than procedural DMLs (比過比過程化程化DML更易于學(xué)習(xí)和使用更易于學(xué)習(xí)和使用) also called declarati

33、ve languages (也稱也稱聲明性語言聲明性語言). SQL, QBE are Non-Procedural DML 2.2 Database Languages1. Data Definition Language (DDL)2. Data Manipulation Language (DML) 3. Procedural DML 4. Non-Procedural DML5. Fourth Generation Language (4GL)5. Fourth Generation Language (4GL)nFourth Generation Language (4GL) 3GL

34、 is procedural, while 4GL is non-procedural: the user defines what is to be done, not how. 4GL includes:Non-Procedural DML: e.g., SQL, QBEForms Generators: an interactive facility for creating data input and display layouts(布局布局) for screen forms (表單生成器表單生成器:為屏幕表單創(chuàng)建數(shù)據(jù)輸為屏幕表單創(chuàng)建數(shù)據(jù)輸入條和顯示布局的交互式工具入條和顯示布局的

35、交互式工具).Report Generators: a facility for creating reports from data stored in the database (報表生成器報表生成器:根據(jù):根據(jù)數(shù)據(jù)庫中存儲的數(shù)據(jù)創(chuàng)建報表的工具數(shù)據(jù)庫中存儲的數(shù)據(jù)創(chuàng)建報表的工具).Graphics Generators: a facility to retrieve data from the database and display the data as a graph, showing trends and relationships in the data (圖形生圖形生成器:成器:

36、將數(shù)據(jù)庫中的數(shù)據(jù)用圖形顯示出來,以展示將數(shù)據(jù)庫中的數(shù)據(jù)用圖形顯示出來,以展示數(shù)據(jù)趨勢和數(shù)據(jù)之間的關(guān)系的工具數(shù)據(jù)趨勢和數(shù)據(jù)之間的關(guān)系的工具). Application Generators: a facility for producing a program that interfaces with the database (應(yīng)用生成應(yīng)用生成器:器:生成與數(shù)據(jù)庫連接的程序的工具生成與數(shù)據(jù)庫連接的程序的工具). Chapter 2 Database Environment(數(shù)據(jù)庫環(huán)境數(shù)據(jù)庫環(huán)境)2.1 The architecture of Database Systems2.2 Databa

37、se Languages2.3 Data Models & Conceptual Modeling 2.4 Functions of a DBMS2.5 Components of a DBMS2.6 Multi-User DBMS Architectures2.3 Data Models & Conceptual ModelingnData Model Integrated collection of concepts for describing data, relationships between data, and constraints on the data, i

38、n an organization (描述描述數(shù)據(jù)數(shù)據(jù)、聯(lián)系聯(lián)系和和約束約束的概念集合的概念集合).nA data model comprises three components (數(shù)據(jù)模型三要素數(shù)據(jù)模型三要素):structural part: a set of rules by which DBs can be constructed (結(jié)構(gòu)成分結(jié)構(gòu)成分: 構(gòu)造構(gòu)造數(shù)據(jù)庫數(shù)據(jù)庫需需遵循遵循的的規(guī)則集合規(guī)則集合)manipulative part: operations that are allowed on the data(操縱成分操縱成分: 在數(shù)據(jù)上在數(shù)據(jù)上允許允許的的操作集合操作集

39、合).integrity rules: ensures that the data is correct(完整性規(guī)則完整性規(guī)則: 保證數(shù)據(jù)的保證數(shù)據(jù)的正確性正確性).2.3 Data Models & Conceptual ModelingnPurpose To represent data in an understandable way (用可理解的用可理解的方式表示數(shù)據(jù)方式表示數(shù)據(jù)).nThere are 3 data models according to 3-level architecture (按按所描述數(shù)據(jù)所處的所描述數(shù)據(jù)所處的層次層次進行分類,有三種數(shù)據(jù)模型進行分類,

40、有三種數(shù)據(jù)模型):external data model: to describe each user view (外部數(shù)外部數(shù)據(jù)模型據(jù)模型:用來描述每個用戶視圖:用來描述每個用戶視圖).conceptual data model: to describe logical view that is DBMS-independent (概念數(shù)據(jù)模型概念數(shù)據(jù)模型:用來描述與:用來描述與DBMS無關(guān)的邏輯視圖無關(guān)的邏輯視圖).internal data model: to describe the conceptual schema in a DBMS-understanding way (內(nèi)部數(shù)據(jù)

41、模型內(nèi)部數(shù)據(jù)模型:用來以:用來以DBMS可理解的方式描述概念模式可理解的方式描述概念模式).nThere are 3 categories of data models (按所描述數(shù)據(jù)的按所描述數(shù)據(jù)的粒度粒度進進行分類,也有三種數(shù)據(jù)模型行分類,也有三種數(shù)據(jù)模型):Object-based data models (基于基于對象對象的數(shù)據(jù)模型的數(shù)據(jù)模型). Record-based data models (基于基于記錄記錄的數(shù)據(jù)模型的數(shù)據(jù)模型). Physical data models (物理物理數(shù)據(jù)模型數(shù)據(jù)模型). 2.3 Data Models & Conceptual Mode

42、lingnObject-Based Data Models: 基于基于實體實體、屬性屬性、聯(lián)系聯(lián)系 概念概念Entity-Relationship Data Model(實體實體-聯(lián)系模型聯(lián)系模型)has emerged as one of the main techniques for database design (已成為數(shù)據(jù)庫設(shè)計的主要技術(shù)之一已成為數(shù)據(jù)庫設(shè)計的主要技術(shù)之一),Object-Oriented Data Model(面向?qū)ο竽P兔嫦驅(qū)ο竽P?extends the definition of entity to include not only attributes bu

43、t also actions(behaviours) (擴充實體定擴充實體定義,使之不僅包含屬性,而且包含行為義,使之不僅包含屬性,而且包含行為). 2.3 Data Models & Conceptual ModelingnRecord-Based Data Models Relational Data Model(關(guān)系模型關(guān)系模型)based on mathematical relations(基于數(shù)學(xué)上定義的關(guān)系基于數(shù)學(xué)上定義的關(guān)系). data & relationships are logically represented as tables, each table

44、 has some columns with a unique name (數(shù)據(jù)數(shù)據(jù)和聯(lián)系在邏輯上都用和聯(lián)系在邏輯上都用表表來表示:表含若干來表示:表含若干列列,在同一張表中,在同一張表中列名具有列名具有唯一性唯一性).BranchbranchNostreetcitypostcodeB005B007B003B004B00222 Deer Rd16 Argyll St163 Main St32 Manse Rd56 Clover DrLondonAberdeenGlasgowBristolLondonSW1 4EHAB2 3SUG11 9QXBS99 1NZNW10 6EUStaffstaffN

45、o fName lNamepositionsex DOBsalary branchNoSL21SG37SG14SA9SG5SL41JohnAnnDavidMarySusanJulieWhiteBeechFordHoweBrandLeeManagerAssistantSupervisorAssistantManagerAssistantMFMFFF1-Oct-4510-Nov-6024-Mar-5819-Feb-703-Jun-4013-Jun-653000012000180009000240009000B005B003B003B007B003B0052.3 Data Models &

46、Conceptual ModelingNetwork Data Model(網(wǎng)狀模型網(wǎng)狀模型)data is represented as collections of records(數(shù)據(jù)表示數(shù)據(jù)表示成記錄的集合成記錄的集合)B00522 Deer RdLandonB00716 Argyll St AberdeenB003163 Main StGlasgowB004 32 Manse RdBristolB002 56 Clover DrLandonBranchSL41JulieLee Assistant9000SL21JohnWhite Manager30000SA9MaryHowe Ass

47、istant9000SG37AnnBeech Assistant12000SG14 DavidFord Supervisor 18000SG5Susan Brand Manager24000Staff takes a graphic structure: record node, setedge (呈現(xiàn)呈現(xiàn)圖結(jié)構(gòu)圖結(jié)構(gòu):記錄:記錄節(jié)點,聯(lián)系節(jié)點,聯(lián)系邊邊). relationships are explicitly represented by sets (聯(lián)系聯(lián)系用用邊邊表示:邊是記錄之間的表示:邊是記錄之間的連接連接,用,用指針指針實現(xiàn)實現(xiàn)).nRecord-Based Data Mode

48、ls2.3 Data Models & Conceptual ModelingnRecord-Based Data ModelsHierarchical Data Model(層次模型層次模型)is a restricted network model(受限網(wǎng)狀模型受限網(wǎng)狀模型). again, data is represented as collections of records (數(shù)據(jù)數(shù)據(jù)表示成記錄的集合表示成記錄的集合),relationships are represented by sets (聯(lián)系用聯(lián)系用邊邊表示表示).but allows a node to have

49、 only one parent(一個節(jié)點只有一個節(jié)點只有一個雙親一個雙親).takes a tree structure: record node, setedge (呈現(xiàn)呈現(xiàn)樹結(jié)構(gòu)樹結(jié)構(gòu):記錄:記錄節(jié)點,聯(lián)系節(jié)點,聯(lián)系邊邊).9000LeeAssistantSL41Julie9000LeeAssistantSL41Julie30000WhiteManagerSL21John30000WhiteManagerSL21John12000BeechAssistantSG37Ann12000BeechAssistantSG37Ann18000Ford SupervisorSG14 David180

50、00Ford SupervisorSG14 David9000AssistantHoweMarySA99000AssistantHoweMarySA9LandonB005LandonB005GlasgowB003GlasgowB003AberdeenB007AberdeenB00724000ManagerBrandSusanSG524000ManagerBrandSusanSG5BristolB004BristolB004LandonB002LandonB0022.3 Data Models & Conceptual ModelingnPhysical Data Modelsdescr

51、ibe how data is stored in the computer, represent info such as:record structures(記錄結(jié)構(gòu)記錄結(jié)構(gòu)),record orderings(記錄順序記錄順序), access paths(存取路徑:存取路徑:順序順序/隨機存取隨機存?。克饕饕??). 2.3 Data Models & Conceptual ModelingnConceptual Modeling(概念建模概念建模)Conceptual schema is the core of a system supporting all user vie

52、ws (概念模式概念模式是系統(tǒng)能夠支是系統(tǒng)能夠支持所有用戶視圖的持所有用戶視圖的核心機制核心機制), and should completely and accurately represent organizations data requirements (應(yīng)該應(yīng)該完整準(zhǔn)確完整準(zhǔn)確地代表企業(yè)的數(shù)據(jù)需求地代表企業(yè)的數(shù)據(jù)需求).Conceptual modeling, or conceptual database design, is the process of developing a model of info that is independent of implementation

53、details (概概念建模念建模(概念結(jié)構(gòu)設(shè)計概念結(jié)構(gòu)設(shè)計)是開發(fā)是開發(fā)與實現(xiàn)細(xì)節(jié)無關(guān)的與實現(xiàn)細(xì)節(jié)無關(guān)的信息模型信息模型的的過程過程).Chapter 2 Database Environment(數(shù)據(jù)庫環(huán)境數(shù)據(jù)庫環(huán)境)2.1 The Architecture of Database Systems2.2 Database Languages2.3 Data Models & Conceptual Modeling 2.4 Functions of a DBMS2.5 Components of a DBMS2.6 Multi-User DBMS Architectures2.4 F

54、unctions of a DBMSnData Storage, Retrieval, and Update (數(shù)據(jù)數(shù)據(jù)存儲存儲、檢索檢索、更更新新).nA User-Accessible Catalog(可供用戶存取的可供用戶存取的系統(tǒng)目錄系統(tǒng)目錄)Store descriptions of data items(存放存放數(shù)據(jù)描述數(shù)據(jù)描述).nTransaction Support (事務(wù)事務(wù)支持支持)Transaction is a series of actions(事務(wù)是一個操作序列事務(wù)是一個操作序列).nConcurrency Control Services (并發(fā)控制并發(fā)控制服務(wù)

55、服務(wù))enable multiple users to concurrently access shared data (允許多個用戶同時存取共享數(shù)據(jù)允許多個用戶同時存取共享數(shù)據(jù)).nRecovery Services(恢復(fù)恢復(fù)服務(wù)服務(wù))a mechanism for recovering the DB when it is damaged (當(dāng)數(shù)據(jù)庫遭到破壞時恢復(fù)數(shù)據(jù)庫的機制當(dāng)數(shù)據(jù)庫遭到破壞時恢復(fù)數(shù)據(jù)庫的機制).2.4 Functions of a DBMSnAuthorization Services(授權(quán)授權(quán)服務(wù)服務(wù))a mechanism to ensure that only aut

56、horized users can access the DB(保證僅保證僅合法用戶合法用戶能夠存取數(shù)據(jù)庫能夠存取數(shù)據(jù)庫的機制的機制:支持:支持授權(quán)授權(quán)與與權(quán)限檢查權(quán)限檢查).nSupport for Data Communication(支持?jǐn)?shù)據(jù)支持?jǐn)?shù)據(jù)通信通信)to exchange info with other systems(與其他系統(tǒng)交與其他系統(tǒng)交換信息換信息).nIntegrity Services(完整性完整性服務(wù)服務(wù)).DB integrity means correctness & consistency of stored data (數(shù)據(jù)庫數(shù)據(jù)庫完整性完整性指數(shù)

57、據(jù)的指數(shù)據(jù)的正確性正確性和和一致一致性:性:支持完整性支持完整性定義定義與與檢查檢查).nServices to Promote Data Independence(提升提升數(shù)據(jù)獨立數(shù)據(jù)獨立性性的服務(wù)的服務(wù)).to support the independence of programs from the structure of DB(支持程序和數(shù)據(jù)庫結(jié)構(gòu)之間的獨立性支持程序和數(shù)據(jù)庫結(jié)構(gòu)之間的獨立性).2.4 Functions of a DBMSnUtility Services(實用工具實用工具)Import facilities (導(dǎo)入導(dǎo)入工具工具):to load the datab

58、ase from flat files(從文本文件裝載數(shù)據(jù)庫從文本文件裝載數(shù)據(jù)庫).Export facilities(導(dǎo)出導(dǎo)出工具工具):to unload the database to flat files(將數(shù)據(jù)庫中的數(shù)據(jù)輸出到文本文件將數(shù)據(jù)庫中的數(shù)據(jù)輸出到文本文件).Monitoring facilities(監(jiān)視監(jiān)視工具工具): to monitor database usage and operation(監(jiān)視數(shù)據(jù)庫的使用和操作監(jiān)視數(shù)據(jù)庫的使用和操作).statistical analysis programs(統(tǒng)計分析統(tǒng)計分析工具工具): to examine performa

59、nce or usage statistics(檢查運行性檢查運行性能、統(tǒng)計使用頻率能、統(tǒng)計使用頻率).Chapter 2 Database Environment(數(shù)據(jù)庫環(huán)境數(shù)據(jù)庫環(huán)境)2.1 The Architecture of Database Systems2.2 Database Languages2.3 Data Models & Conceptual Modeling 2.4 Functions of a DBMS2.5 Components of a DBMS2.6 Multi-User DBMS Architectures2.5 Components of a DB

60、MSnQuery processor (查詢處理器查詢處理器): transforms queries into low-level instructions (將查詢轉(zhuǎn)換成低層指令將查詢轉(zhuǎn)換成低層指令).nDB manager (DM) (數(shù)據(jù)庫管理器數(shù)據(jù)庫管理器): accepts queries, places calls to file manager (接受查詢接受查詢, 向文件管理向文件管理器傳送請求器傳送請求).nFile manager (文件管理器文件管理器): controls storage files (控制存儲文件控制存儲文件).nDML pre-processor (DML預(yù)處理器預(yù)處理器): converts DML statements into functions of host languag

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論