20151209 OCP 047 1-40

6.which two statements are true?

a.the user_sysnonyyms view can provide information about privite synoyms.

对,无论是共有同义词还是私有同义词都可以提供

b.the user system owns all the base tables and user-accessible views of the data dictionaary

除了sys用户能访问基表,其他用户不可以

c.all the dymatic performance views prefixed with v$ are accessible to all the database users;

所有的动态视图都可以被所有的用户访问?放屁,只有sys用户能访问所有的用户

d.the user_objects view can provide information about the tables and views created by the user

错,不是created被用户,而是当前用户目前所拥有的表

e.dictionary is a view that ciontains the names of all the data dictionary views that the usercan access

22.which statements correctly grants a system privilege ?

a.grant execute on pro1 to public;

grant权限on数据库对象to用户是属于对象权限,而不是系统权限,所以答案不符合题意

b.grant create view on table1 to user1;

在create view 后面不能加具体的某个对象,没有这样的写法

c.grant create table to user1,user2;

d.grant create session to all

应该是具体的用户,不能是all

23.view the exhibit and examine the structure of the CUST table .evaluate the following sql statements executed in the given order;

alter table cust add constraint cust_id_pk primary key(cust_id) deferrable initally deferd;

insert into cust values(1,'RAJ'); --row 1

insert into cust values(1,'SAM'); --row2

commit;

set constrint cust_id_pk immeidate;

insert into cust values(1,'lata');--row3

insert into cust values(2,'king');--row 4

commit;

which rows would be made permanent in the cust table?

c.row 3and row 4

在白哦cust设了主键cust_id(唯一且非空),在主键延迟约束,所谓延迟约束就是在dml时数据库不判断dml是否满足约束,在

commit时判断,此时如果不满足约束条件那就会rollback

而3和4行cust_id没有重复,所以可以插入

24.view the exhibit and examine the structure of the orders table;

the order_id column has the primary key constrint and customer_id has the not null constrint

evaluate the following statement;

insert into (select order_id,order_data,customer_id from orders where order_total=100 with check option)values (13,sysdate,101)

what would be the outcome of the above insert statement?

c.it would not execute successfuly because the order_total column is not specified in the select list and not value is provided fot it

考察insert with check option的用法

其实insert 是插入到查询的这张表里,只不过不满足子查询里的where条件的话,就不允许插入

另外,如果插入的列有不再子查询作为检查的where条件里,那么也会不允许插入。如果不加with check option则在插入式不会检查

在这道题里select子查询没有orader_total列,是不允许插入的。此外不加with check option则在插入时不会检查

26.which statement is true regarding external tables?

d.the create tables as select statement can be used to unload data into regular table in the database from an external table

外部表是存储在数据库外部的操作系统文件,oracle可以以只读的方式来访问该文件,也就是说可以在查询语句中将外部表与数据库中

其他表进行连接,但是不能给外部表加索引,和金星dml操作,不能添加虚拟咧,因为他不是真正的数据库表。另外,如果与数据库相关联的外部

文件被改变或者删除,会影响到外部表返回查询结果

错误的

a.the default reject limnit for external tables is unlimited

应该是0

b.the data and meadata for an external are sroed outside the dataase

外部表的数据可以放在数据库外,但meidata必须放在数据库内部‘

c.oracle_loader and oracle_datapumo have exactly the same funcitionity when used with an external table

两者功能不尽相同,后者雨大较为简单

29.a non-correlated subquery can be defined as..?

d.a set of one or more sequential queries in which generally the result of the innwer query is used as the serch value in the outrt query

must的不选,only也不选!

31.which statements are true regarding the hierarchical in oracle database 10g

a.it is possible to retrieve data only in top-town hierarchy

既可以从上往下又可以从下网上

b.it is possible to retrieve data in top-down or bottom-up hierarchy

c.it is possible to remove an entire btance from the output of the hierarchichical query

d,you cannot specify conditions when you retrieve data by using a hierachical query

可以指定条件

所以bc对

32.which two statements are true regarding views?

a.a simple view in which column aliases have been used cannot be updated.

如果是简单视图的话,可以进行update操作,不管是不是取了别名

b.a subquery used in a complex view definition cannot contain group functions or joins

正是因为使用了复杂函数,才被称为复杂视图

c.rows cannot be deleted through a view if the view definition contains the distinct keyword 

如果视图包含了distinct关键字,那么不能通过这个视图删除行

在包含dsiitnct关键字的视图上不允许进行任何的dml操作

d.rows added through a view are deleted from the table ajutomatically when the view 

is dropped 

通过视图添加的话昂实际上是添加在视图所指向的表上,所以删除视图对视图基于的表没有任何关联操作

e.the or replace option is used to change the defination of an existing view without dropping and recreating it

or repalce选项使用来改变一个已经存在的视图的定义,而不用删除视图

38.which statements are correct regarding indexes?

a.when a table is dropped,the corresponding indexes are automatically drooped

表被删掉,索引自动就被删掉

b.for each dml operation performed,the corresponding indexes are automatically updated

dml操作时,索引会自动更新

c.indexes should be created on columns that are frequently referenced  as part of an exporession

建议,e而不是必须should

d.a non-defferable primary key or unique key constaraints in a table automatically creates a unique index

一个表中的一个不可延时的主键或者唯一性约束会自动创建一个唯一性索引


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值