racle 9i學習日誌(4)--邏輯結構與習題解析

Logical Structure
1
 
在oracle database中數據時存儲在tablespaces(表空間)裏的,一個表空間只能屬於一個database,一個表空間可以對應一個或多個物理文件(data file)。
一個oracle server上只有一個database,一個database包含至少一個表空間,一個表空間包含一個或多個段,一段由多個extent組成,extent由許多連續的塊(block)組成。
一個segment不能跨越表空間,但一個segment可以屬於不同的data file。但一個extent不能跨越data file。
data block是oracle server分配,讀寫等基本操作的最小存儲單元,大小由DB_BLOCK_SIZE這個參數指定,但必須是操作系統block的整數倍,最大尺寸不同的系統不同。
SQL語句的處理過程
處理一個查詢:
1.解析:
       -查找相同的語句
       -檢查語法,目標名,權限
       -Lock objects used during parse
       -創建和存儲執行計劃
2.綁定:得到一個變量
3.執行:
4.返回:返回結果
處理DML語句,處理DDL語句:
基本過程類似,可分爲連接,安全檢查,解析,綁定變量,執行,返回結果。
 
Practice 1: Oracle Architectural Components
1 Which one of the following statements is true?
a An Oracle server is a collection of data consisting of three file types.
b A user establishes a connection with the database by starting an Oracle instance.
c A connection is a communication pathway between the Oracle server and the Oracle instance.
d A session starts when a user is validated by the Oracle server.
答案:d。
解析:a,這是對database files的描述,而不是oracle server。b,一個oracle server只會啓動一個instance,user直接與server process打交道而不是instance,一般來說一個connection對應一個server process。c,參考“我的學習筆記(3)”可知,這是對session的描述,而不是connection。d,正確。
2 Which one of the following memory areas is not part of the SGA?
a Database Buffer Cache
b PGA
c Redo Log Buffer
d Shared Pool
答案:b。
3 Which two of the following statements are true about the Shared Pool?
a The Shared Pool consists of the Library Cache, Data Dictionary Cache, Shared  SQL area, Java Pool, and Large Pool.
b The Shared Pool is used to store the most recently executed SQL statements.
c The Shared Pool is used for an object that can be shared globally.
d The Library Cache consists of the Shared SQL and Shared PL/SQL areas.
答案:b,d。
解析:c答案在oracle教材上有這樣的話“Because the Shared Pool is used for objects that can be shared globally”,但在這個題目中有歧義,c,d兩項最佳答案是d。

4 Which one of the following memory areas is used to cache the data dictionary
information?
a Database Buffer Cache
b PGA
c Redo Log Buffer
d Shared Pool
答案:d。

5 The primary purpose of the Redo Log Buffer is to record all changes to the database
data blocks.
a True
b False
答案:a。
6 The PGA is a memory region that contains data and control information for multiple
server processes or multiple background processes.
a True
b False
答案:b。
解析:不是multiple,是single。一個PGA對應一個進程。
7 Which of the following becomes available when an Oracle instance is started?
a User process
b Server process
c Background processes
答案:c。

8 Identify five mandatory background processes.
答案:DBWn,LGWR,SMON,PMON,CKPT

9 Match the process with its task.
a Database Writer          1 Assists with writing to the data file headers
b Log Writer                     2 Is responsible for instance recovery
c System Monitor            3 Cleans up after failed processes
d Process Monitor          4 Records database changes for recovery purposes
e Checkpoint                   5 Writes dirty buffers to the data files
答案:a-5,b-4,c-2,d-3,e-1。
10 The physical structure of an Oracle database consists of control files, data files, and
online redo log files.
a True
b False
答案:a。

11 Place the following structures in order of hierarchy beginning with database.
a Tablespaces
b Extent
c Segment
d Database
e Block
答案:從小到大順序:e,b,c,a,d.

12 Identify the components of an Oracle server.
答案:database,instance。

13 Identify the components of an Oracle instance.
答案:內存結構(或SGA)和後臺進程
 
14 Identify three file types that make up an Oracle database.
答案:data files,control files,redo log files。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章