Which view can have all the DML operations performed on it?

View the Exhibit button and examine the structures of ORDERS and ORDER_ITEMS tables. In the ORDERS table, ORDER_ID is the PRIMARY KEY and in the ORDER_ITEMS table, ORDER_ID and LINE_ITEM_ID form the composite primary key. Which view can have all the DML operations performed on it?

View the Exhibit button and examine the structures of ORDERS and ORDER_ITEMS tables.

In the ORDERS table, ORDER_ID is the PRIMARY KEY and in the ORDER_ITEMS table, ORDER_ID and LINE_ITEM_ID form the composite primary key.

Which view can have all the DML operations performed on it?

A.
CREATE VIEW V1
AS SELECT order_id, product_id
FROM order_items;

B.
CREATE VIEW V4(or_no, or_date, cust_id)
AS SELECT order_id, order_date, customer_id
FROM orders
WHERE order_date < ’30-mar-2007′ WITH CHECK OPTION;

C.
CREATE VIEW V3
AS SELECT o.order_id, o.customer_id, i.product_id
FROM orders o, order_items i
WHERE o.order_id=i.order_id;

D.
CREATE VIEW V2
AS SELECT order_id, line_item_id, unit_price*quantity total FROM order_items;



Leave a Reply 5

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


miriam

miriam

Why is B the answer??

nguimza

nguimza

Beacause:
A – the view contain just Primary keys so you can’t UPDATE it in the main table througth the wies event if the view is the simple view.

C- Beacause it is complexe view and DML are not alow in this case.

D – Beacause the view contain an expression unit_price*quantity so you can’t update.
Now it is clear that the right answer is B.

X-RAY

X-RAY

update operation can be limited in answer B, but it’s the only choice

ismail

ismail

i didn’t understand why A is false.

Emil

Emil

“A” false because, its not support insert command because only one column from composite primary key is using. but Question is which view can receive all DML comand.