我的oracle 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。










本文转自 d185740815 51CTO博客,原文链接:http://blog.51cto.com/luotaoyang/277406,如需转载请自行联系原作者
目录
相关文章
|
3月前
|
存储 Go
Go 浅析主流日志库:从设计层学习如何集成日志轮转与切割功能
本文将探讨几个热门的 go 日志库如 logrus、zap 和官网的 slog,我将分析这些库的的关键设计元素,探讨它们是如何支持日志轮转与切割功能的配置。
93 0
Go 浅析主流日志库:从设计层学习如何集成日志轮转与切割功能
|
4月前
|
设计模式
二十三种设计模式全面解析-职责链模式的高级应用-日志记录系统
二十三种设计模式全面解析-职责链模式的高级应用-日志记录系统
|
4月前
|
Kubernetes 容器
k8s学习-CKS真题-日志审计 log audit
k8s学习-CKS真题-日志审计 log audit
73 0
|
4月前
|
存储 缓存 关系型数据库
认真学习MySQL的事务日志-Redo日志
认真学习MySQL的事务日志-Redo日志
44 0
|
4月前
|
Kubernetes 监控 容器
k8s学习-CKA真题-监控Pod日志
k8s学习-CKA真题-监控Pod日志
78 0
|
1月前
|
消息中间件 测试技术 Python
Python使用多线程解析超大日志文件
Python使用多线程解析超大日志文件
20 0
|
1月前
|
缓存 Oracle 关系型数据库
oracle 软软解析
oracle 软软解析
13 0
|
2月前
|
SQL 关系型数据库 MySQL
MySQL技能完整学习列表11、日志和备份——1、查看日志——2、数据备份和恢复(mysqldump, mysqlbinlog)
MySQL技能完整学习列表11、日志和备份——1、查看日志——2、数据备份和恢复(mysqldump, mysqlbinlog)
45 0
|
2月前
|
SQL 监控 关系型数据库
数据库日志解析:深入了解MySQL中的各类日志
数据库日志解析:深入了解MySQL中的各类日志
202 0
|
4月前
|
SQL 存储 关系型数据库
认真学习MySQL中的二进制日志(binlog)与中继日志(Relay log)
认真学习MySQL中的二进制日志(binlog)与中继日志(Relay log)
97 0

推荐镜像

更多