教学文章
Technology Exchange
热门课程
400电话

免费咨询热线
400-090-9964

教学文章

新题->2019最新OCP 062考试题库原题-第51题

时间:2019-06-17 来源:

2018年的时候,OCP 11g考试题库大更新,052 053出现了很多新题,

2019年,11g即将停考的前期,Oracle又出现了一次大变动,12c出现了很多新题,比如062 063题库大更新

OCP解析公开课时间:【每周五晚8点】

OCP解析公开课地址:https://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删除行时是基于行级的锁。试验证明是可以删除其它子表上的行。)

版权所有@北京神脑资讯技术有限公司(CUUG,中国UNIX用户协会) Copyright ALL Rights Reserved 京ICP备11008061号-1

CUUG旗下网站:www.cuug.com.cn www.cuug.com oracle.cuug.com bbs.cuug.com www.cuug.net

电话:010-59426307 010-59426319 邮政编码:100089

地址:北京市海淀区北清路164号28-38号院