Which three additional tasks must you do?

Exhibit:
SQL> desc orders
Name Null? Type
—————————— ————– —————— ORDER_ID NOT NULL NUMBER(12)
ORDER_DATE NOT NULL DATE
ORDER_MODE VARCHAR2(8)
CUSTOMER_ID NOT NULL NUMBER(6)
ORDER_STATUS NUMBER(2)
ORDER_TOTAL NUMBER(8,2)
SALES_REP_ID NUMBER(6)
SQL> desc order_items
Name Null? Type
—————————– ————– —————— ORDER_ID NOT NULL NUMBER(12)
LINE_ITEM_ID NOT NULL NUMBER(3)
PRODUCT_ID NOT NULL NUMBER(6)
UNIT_PRICE NUMBER(8,2)
QUANTITY NUMBER(8)
ITEM_TOTAL NUMBER(10,2)
Examine the structure of the ORDERS and ORDER_ITEMS tables. The ORDERS table has been denormalized in that the column ORDER_TOTAL contains the total cost for all ORDER_ITEMS linked to particular order via the foreign key ORDER_ID. You need to create a form that maintains the denormalized column in the database and displays the updated Order_Total whenever the Unit_Price or Quantity is changed on the screen. To achieve this, you have created a non-base-table Calculated item (ITEM_COTAL in the Order Items block) that calculates UNIT_PROCE * QUANTITY and another non-base-table Calculated item (ORDER_TOTAL in the Control block) that summarized ITEM_TOTAL.
Which three additional tasks must you do? (Choose three)

Exhibit:

SQL> desc orders
Name Null? Type
—————————— ————– —————— ORDER_ID NOT NULL NUMBER(12)
ORDER_DATE NOT NULL DATE
ORDER_MODE VARCHAR2(8)
CUSTOMER_ID NOT NULL NUMBER(6)
ORDER_STATUS NUMBER(2)
ORDER_TOTAL NUMBER(8,2)
SALES_REP_ID NUMBER(6)
SQL> desc order_items
Name Null? Type
—————————– ————– —————— ORDER_ID NOT NULL NUMBER(12)
LINE_ITEM_ID NOT NULL NUMBER(3)
PRODUCT_ID NOT NULL NUMBER(6)
UNIT_PRICE NUMBER(8,2)
QUANTITY NUMBER(8)
ITEM_TOTAL NUMBER(10,2)
Examine the structure of the ORDERS and ORDER_ITEMS tables. The ORDERS table has been denormalized in that the column ORDER_TOTAL contains the total cost for all ORDER_ITEMS linked to particular order via the foreign key ORDER_ID. You need to create a form that maintains the denormalized column in the database and displays the updated Order_Total whenever the Unit_Price or Quantity is changed on the screen. To achieve this, you have created a non-base-table Calculated item (ITEM_COTAL in the Order Items block) that calculates UNIT_PROCE * QUANTITY and another non-base-table Calculated item (ORDER_TOTAL in the Control block) that summarized ITEM_TOTAL.

Which three additional tasks must you do? (Choose three)

A.
Set the Database Item property of ORDER_TOTAL to Yes.

B.
Set the Update Allowed property of ORDER_TOTAL to Yes.

C.
Set the Single Record property of the Control block to Yes.

D.
Set the Query All Record property of the Order Items block to Yes.

E.
Set the Precompute Summaries property of the Order Items block to Yes.

F.
Create a null canvas item based on the ORDER_TOTAL column and set its Copy Value From Item property to CONTROL.ORDER_TOTAL.

G.
Write a database trigger to update ORDER_TOTAL in the ORDERS table when a change is written to the ORDER_ITEMS table.

H.
Write a stored procedure to update ORDER_TOTAL in the ORDERS table and call it from a When-Validate-Item trigger whenever a change is made to the UNIT_PRICE or QUANTITY fields.



Leave a Reply 0

Your email address will not be published. Required fields are marked *