zoukankan      html  css  js  c++  java
  • 1z0-052 q209_4

    4: You have two tables with referential integrity enforced between them. You need to insert data to
    the child table first because it is going to be a long transaction and data for the parent table will be
    available in a later stage, which can be inserted as part of the same transaction.

    View the Exhibit to examine the commands used to create tables.

    Which action would you take to delay the referential integrity checking until the end of the
    transaction?


    A.Set the constraint to deferred before starting the transaction.

    B.Alter the constraint to NOVALIDATE state before starting the transaction.

    C.Enable the resumable mode for the session before starting the transaction.

    D.Set the COMMIT_WAIT parameter to FORCE_WAIT for the session before starting the
    transaction.

    Correct Answers: A

    你有两个表,它们之间有参照完整性的约束。在同一个事务中,你需要先在子表中插入数据,然后再使父表变为可用。

    从图上可知,orders表是子表,它的item_code列参照items表的iitem_code,但是题中是先在子表中插入数据,然后再让父表变为可用,在有外键约束的情况下,这样是不能插入的,所以,可以在执行事务前,设置约束延迟生效,即在事务提交时生效,即可

  • 相关阅读:
    洛谷P2444 病毒【AC自动机】
    AC自动机
    洛谷试炼场2-5---字符串处理【字符串】
    洛谷试炼场1-5---简单字符串【字符串】
    poj2185 Milking Grid【KMP】
    poj3630 Phone List【Trie树】
    CH1809匹配统计【KMP】
    打包命令
    django_auth模块
    mongodb-Configuration
  • 原文地址:https://www.cnblogs.com/xiaoit/p/3406358.html
Copyright © 2011-2022 走看看