Home » Microsoft » 70-518 » What should you recommend?
You are modifying an existing Windows Presentation Foundation (WPF) application that uses .NET Framework 4. The WPF application uses a wizard to capture data and insert the data into a database. The database includes one parent table and many child tables.
Inserting captured data in the database locks many database tables and delays application access.
You have the following requirements:
. Reduce delays when saving data.
. Ensure that other application users are not blocked from reading data. . Ensure that captured data is available only after all child tables are updated. You need to recommend an approach for inserting captured data into the database.
What should you recommend?
A. Insert all captured data in a single transaction when the user completes the wizard.
B. Insert captured data by using a single transaction as the user completes each wizard page.
C. Insert captured data by using non-transactional operations when the user completes the wizard.
D. Insert captured data by using optimistic concurrency as the user completes each wizard page.
Correct Answer: A
Explanation/Reference:
A. one transaction in the end => Yes
B. Works but to many transactions => out
C. non-transactional operations: users should not blocked from reading data => out
D. optimistic concurrency for each page– we need one operation for all pages =>out Pessimistic: In Pessimistic concurrency control a transaction blocks data access operations of other non-materialized until blocking is removed. This to transactions upon conflicts, and conflicts are ensure that operations that may violate serializability (and in practice also recoverability) do not occur.
Optimistic: In Optimistic concurrency control data access operations of other transactions are not materialized. When the transaction reaches the blocked upon conflicts, and conflicts are immediately ready state, i.e., its running state has been completed, possible serializability (and in practice also recoverability) violation by the transaction’s operations (relatively to other running transactions) is checked:
aborted (sometimes aborting another transaction to If violation has occurred, the transaction is typically committed.
handle serializability violation is preferred). Otherwise it is