Logical Structure
<a href="http://luotaoyang.blog.51cto.com/attachment/201002/21/545649_1266739406uIrr.png"></a>
<a target="_blank" href="http://blog.51cto.com/attachment/201002/160437434.png"></a>
在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?
d Shared Pool
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.
解析:不是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.
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。
本文轉自 d185740815 51CTO部落格,原文連結:http://blog.51cto.com/luotaoyang/277406,如需轉載請自行聯系原作者