Upgrade Oracle DBA 11g to Oracle Database 12c — Question 4
Evaluate these statements:
CREATE TABLE purchase_orders -
(po_idNUMBER(4),
po_dateTIMESTAMP,
supplier_idNUM8ER(6),
po_totalNUMBER(8,2), CONSTRAINT order_pk PRIMARY KEY(po_id))
PARTITIONBYRANGE(po_date)
(PARTITIONQ1 VALUESLESSTHAN (TO_DATE('01-apr-2007','dd-mon-yyyy')), PARTITIONQ2VALUESLESSTHAN(TO_DATE('01-jul-2007','dd-mon-yyyy')),
PARTITIONQ3VALUESLESSTHAN (TO~DATE('01-oct-2007','dd-non-yyyy')), PARTITIONQ4VALUESLESSTHAN (TO_DATE('Ol-jan-2008','dd-non-yyyy' )));
CREATETABLEpurchase_order_items -
(po_idNUM3ER(4)NOTNULL,
product_idNUMBER(6)NOTNULL,
unit_prlceNUMBER(8,2),
quantity NUMBER(8),
CONSTRAINTpo_items_f k -
FOREIGNKEY(po_id)REFERENCESpurchase_orders(po_id) )
PARTITIONBYREFERENCE(po_items_fk);
Which two statements are true?
Answer options
- A. Partitions of purchase_order_items are assigned unique names based on a sequence.
- B. The purchase_orders and purchase_order_items tables are created with four partitioneach.
- C. purchase_order_items table partitions exist in the same tablespaces as the purchase_orders table partitions.
- D. The purckase_order_:teks table inherits the partitioning key by duplicating the key columns from the parent table.
- E. Partition maintenance operations on the purchase_order_items table require disabling the foreign key constraint.
Correct answer: C, E
Explanation
Option C is correct because the partitions of the purchase_order_items table share the same tablespaces as those of the purchase_orders table due to the partitioning by reference. Option E is also correct as it highlights the need to disable the foreign key constraint for maintenance operations. Options A, B, and D are incorrect as they misinterpret the partitioning properties and constraints of the tables.