You need to create triggers that meet the following req…

HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but the text
of the scenario is exactly the same in each question in this series.
You have a database named Sales that contains the following database tables: Customer, Order, and
Products. The Products table and the Order table are shown in the following diagram.

The customer table includes a column that stores the data for the last order that the customer placed.
You plan to create a table named Leads. The Leads table is expected to contain approximately 20,000 records.
Storage requirements for the Leads table must be minimized.
You need to create triggers that meet the following requirements:
Optimize the performance and data integrity of the tables.
Provide a custom error if a user attempts to create an order for a customer that does not exist.
In the Customers table, update the value for the last order placed.
Complete all actions as part of the original transaction.
In the table below, identify the trigger types that meet the requirements.
NOTE: Make only selection in each column. Each correct selection is worth one point.
Hot Area:

HOTSPOT
Note: This question is part of a series of questions that use the same scenario. For your convenience, the
scenario is repeated in each question. Each question presents a different goal and answer choices, but the text
of the scenario is exactly the same in each question in this series.
You have a database named Sales that contains the following database tables: Customer, Order, and
Products. The Products table and the Order table are shown in the following diagram.

The customer table includes a column that stores the data for the last order that the customer placed.
You plan to create a table named Leads. The Leads table is expected to contain approximately 20,000 records.
Storage requirements for the Leads table must be minimized.
You need to create triggers that meet the following requirements:
Optimize the performance and data integrity of the tables.
Provide a custom error if a user attempts to create an order for a customer that does not exist.
In the Customers table, update the value for the last order placed.
Complete all actions as part of the original transaction.
In the table below, identify the trigger types that meet the requirements.
NOTE: Make only selection in each column. Each correct selection is worth one point.
Hot Area:

Answer:

Explanation:
INSTEAD OF INSERT triggers can be defined on a view or table to replace the standard action of the INSERT
statement.
AFTER specifies that the DML trigger is fired only when all operations specified in the triggering SQL statement
have executed successfully.
https://technet.microsoft.com/en-us/library/ms175089(v=sql.105).aspx



Leave a Reply 5

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


KK

KK

Two new questions:

QUESTION
You are developing an application to track customer sales.
You need to create a database object that meets the following requirements:
– Launch when table data is modified.
– Evaluate the state a table before and after a data modification and take action based on the difference.
– Prevent malicious or incorrect table data operations.
– Prevent changes that violate referential integrity by cancelling the attempted data modification.
– Run managed code packaged in an assembly that is created in the Microsoft.NET Framework and located into Microsoft SQL Server.
What should you create?

A. extended procedure
B. CLR procedure
C. user-defined procedure
D. DML trigger
E. scalar-valued function
F. table-valued function

Answer: D

QUESTION
You are developing and application to track customer sales.
You need to return the sum of orders that have been finalized, given a specified order identifier. This value will be used in other Transact-SOL statements.
You need to create a database object.
What should you create?

A. extended procedure
B. CLR procedure
C. user-defined procedure
D. DML trigger
E. scalar-valued function
F. table-valued function

Answer: E

More: https://www.braindump2go.com/70-762.html

LuckyChap

LuckyChap

Thankyou..do you have a few more latest questions? I’ll have to take the exam this week..

Johnny

Johnny

And how was your exam? Have you passed it?
How many new questions?

Focusnation

Focusnation

Thanks

berend

berend

IMO the answer is wrong.
Provide custom error – Instead of insert.
AFTER INSERT usage is possible too, but it is important to prevent “wrong” transactions and subsequent rollbacks to optimize performance. Performance optimization is one of the requirements in this question.
Update the value – After insert.
Because creating new order is INSERT tran, not UPDATE.