【2019】OCP考试062题库近期考试原题解析-第51题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询2018年的时候,OCP 11g考试题库大更新,052 053出现了很多新题,
2019年,11g即将停考的前期,Oracle又出现了一次大变动,12c出现了很多新题,比如062 063题库大更新
OCP解析公开课时间:【每周五晚8点】
OCP解析公开课地址:http://ke.qq.com/course/326223
OCP解析群资料分享:1015267481 验证:ocp
-------------------------------------------------------
51题、choose one
The HR. DEPARTMENTS table is the parent of the HR. EMPLOYEES table. The EMPLOYEES .
DEPARTMENT_ID column has a foreign key constraint with the ON DELETE CASCADE option that refers to the DEPARTMENTS. DEPARTMENT_ID column. An index exists on the DEPARTMENTS. DEPARTMENT_ID column. A transaction deletes a primary key in the DEPARTMENTS table, which has child rows in the EMPLOYEES table.
Which statement is true?
A) The transaction acquires a table lock on the DEPARTMENTS table. This lock enables other sessions to query but not update the DEPARTMENTS table until the transaction on the DEPARTMENTS table is complete.
B) The transaction acquires a table lock on the EMPLOYEES table. This lock enables other sessions to query but not update the EMPLOYEES table until the transaction on the DEPARTMENTS table is complete.
C) Only the rows that are deleted in the DEPARTMENTS and EMPLOYEES tables are locked until the transaction on the DEPARTMENTS table is complete.
D) The transaction acquires a table lock only on the DEPARTMENTS table until the transaction is complete.
Answer:C
(解析:这道题的关键点就是ON DELETE CASCADE选项,如果把父表的主键删除(注意这里不是删除主键约束),那么子表相对应的行也会被删除,所以在删除父表主键的时候,子表
是被锁住的,目的是同时要删除子表对应的行。因为Oracle删除行时是基于行级的锁。试验证明是可以删除其它子表上的行。)