22.Identify the logical structure that will never have more than one data segment created for it.
2016-07-18 00:44
645 查看
22.Identify the logical structure that will never have more than one data segment created for it.
A.external table
B.partitioned table
C.partitioned index
D.nonclustered table
E.global temporary table
答案:D
解析:
一、首先看下数据库中现有的,多于1个segment的类型
SQL> select distinct segment_type from dba_segments group by segment_name,owner,segment_type having count(*)>1;
SEGMENT_TYPE
------------------
INDEX PARTITION
TABLE SUBPARTITION
TABLE PARTITION
所以排除BC
二、接下来我们创建一个外部表
SQL> create table test_delta
2 (id varchar2(100))
3 organization external
4 (type oracle_loader
5 default directory DATA_DIR
6 access parameters
7 (records delimited by newline characterset us7ascii
8 badfile 'LOG_DIR':'test.bad'
9 logfile 'LOG_DIR':'test.log'
10 fields terminated by " " optionally enclosed by '\t'
11 )
12 location('test_delta.txt')
13 )
14 reject limit unlimited;
Table created.
[oracle@wahaha3 data_dir]$ vi test_delta.txt
1
2
3
4
5
6
7
8
SQL> select * from scott.test_delta;
ID
--------------------------------------------------------------------------------
1
2
3
4
5
6
7
8
8 rows selected.
SQL> select SEGMENT_NAME from user_segments;
SEGMENT_NAME
--------------------------------------------------------------------------------
DEPT
EMP
SALGRADE
WAHAHA2
WAHAHA0713
PK_DEPT
PK_EMP
7 rows selected.
这里说不表不占用segment
三、建立一个global temporary table
SQL> create global temporary table tbgtemp1 (id integer) on commit preserve rows tablespace temp;
Table created.
SQL> insert into tbgtemp1 values(1);
1 row created.
SQL> select table_name,tablespace_name from dba_tables where TABLE_NAME=upper('tbgtemp1');
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TBGTEMP1 TEMP
SQL> select segment_name from dba_segments where tablespace_name='TEMP';
no rows selected
这里也没有
四、nonclustered table指的是非簇表
多个表存在一个段中
create cluster c1 (id integer) tablespace users
create table t1(id integer)cluster c1(id);
create table t2(id integer)cluster c1(id);
create index c1_index on cluster c1;
insert into t1 values(1);
SQL> select segment_name from dba_segments where segment_name='C1';
SEGMENT_NAME
--------------------------------------------------------------------------------
C1
只有1个
非簇表不知道是不是就是多个表不在一个segment中存储的意思
所以这道题
A:是外部表 0个
B:分区表 多个
C:分区索引 多个
D:非簇表 多个
E:全局临时表 0个
我觉得应该选AE
A.external table
B.partitioned table
C.partitioned index
D.nonclustered table
E.global temporary table
答案:D
解析:
一、首先看下数据库中现有的,多于1个segment的类型
SQL> select distinct segment_type from dba_segments group by segment_name,owner,segment_type having count(*)>1;
SEGMENT_TYPE
------------------
INDEX PARTITION
TABLE SUBPARTITION
TABLE PARTITION
所以排除BC
二、接下来我们创建一个外部表
SQL> create table test_delta
2 (id varchar2(100))
3 organization external
4 (type oracle_loader
5 default directory DATA_DIR
6 access parameters
7 (records delimited by newline characterset us7ascii
8 badfile 'LOG_DIR':'test.bad'
9 logfile 'LOG_DIR':'test.log'
10 fields terminated by " " optionally enclosed by '\t'
11 )
12 location('test_delta.txt')
13 )
14 reject limit unlimited;
Table created.
[oracle@wahaha3 data_dir]$ vi test_delta.txt
1
2
3
4
5
6
7
8
SQL> select * from scott.test_delta;
ID
--------------------------------------------------------------------------------
1
2
3
4
5
6
7
8
8 rows selected.
SQL> select SEGMENT_NAME from user_segments;
SEGMENT_NAME
--------------------------------------------------------------------------------
DEPT
EMP
SALGRADE
WAHAHA2
WAHAHA0713
PK_DEPT
PK_EMP
7 rows selected.
这里说不表不占用segment
三、建立一个global temporary table
SQL> create global temporary table tbgtemp1 (id integer) on commit preserve rows tablespace temp;
Table created.
SQL> insert into tbgtemp1 values(1);
1 row created.
SQL> select table_name,tablespace_name from dba_tables where TABLE_NAME=upper('tbgtemp1');
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TBGTEMP1 TEMP
SQL> select segment_name from dba_segments where tablespace_name='TEMP';
no rows selected
这里也没有
四、nonclustered table指的是非簇表
多个表存在一个段中
create cluster c1 (id integer) tablespace users
create table t1(id integer)cluster c1(id);
create table t2(id integer)cluster c1(id);
create index c1_index on cluster c1;
insert into t1 values(1);
SQL> select segment_name from dba_segments where segment_name='C1';
SEGMENT_NAME
--------------------------------------------------------------------------------
C1
只有1个
非簇表不知道是不是就是多个表不在一个segment中存储的意思
所以这道题
A:是外部表 0个
B:分区表 多个
C:分区索引 多个
D:非簇表 多个
E:全局临时表 0个
我觉得应该选AE
相关文章推荐
- 2.Which two statements are true about the Automatic Workload Repository (AWR)
- 3.While observing the index statistics, you find that an index is highly fragmented, thereby resulti
- 4.Your test database is running in NOARCHIVELOG mode. Which statement is true regarding the type of
- 5.The database instance is currently using SPFILE. View the Exhibit and examine the error that you
- 6.Note the following points describing various utilities in Oracle Database 11g:
- 7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Considerthe steps t
- 8.Observe the information in the columns:
- 9.View the Exhibit and examine the privileges granted to the SL_REP user.
- 10.Examine the following statement that is used to modify the constraint on the SALES table:
- 11.Identify the memory component from which memory may be allocated for:
- 12.Which is the correct description of a pinned buffer in the database buffer cache?
- 13.You have executed this command to change the size of the database buffer cache:
- 14.These are points that describe the contents of different memory components:
- 15.Which two statements are true about Shared SQL Area and Private SQL Area? (Choose two.)
- 16.Note the following functionalities of various background processes:
- 17.Note the functionalities of various background processes:
- 18.View the Exhibit and identify the component marked with a question mark.
- 19.Which two statements about the background process of the database writer are true? (Choose two.)
- 20.You have set Tablespace Full Metrics Threshold values for the USERS tablespace as follows:
- 21.Which three statements are true about logical structures of the Oracle database? (Choose three.)