Database Design, "Optimize Update-Concurrency Tests," by Roger Jennings [Visual Studio Magazine, October 2003]

*** README FILE FOR CONCURRENCY TEST CODE AND T-SQL SCRIPT EXAMPLES ***

This archive contains two zipped folders: OrdersClientTS and T-SQL Scripts.

OrdersClientTS (Project)
------------------------
OrdersClientTS is the Visual Basic .NET project that was used to generate the test results in the "Visual Studio Magazine" article "Optimize Update-Concurrency Tests." The project has database-specific
code, so you won't be able to run it without creating and populating the OrdersTS and OrderDetailsTS table, creating SQL Server logins and permissions, and altering the connection strings for multiple servers. When you run the project, you receive a "Can't connect to database" error message.

The client code is provided so that you can examine the approach I used for comparing relative performance of the timestamp and DataSet for data concurrency management. The primary procedures of interest are: 

1. BulkOrdersTS.GetOrUpdateDataSet, which updates the persistent typed DSOrder1 dataset, which uses designer-created SqlDataAdapter objects.

2. clsOrdersTS.UpdateOrInsertOrderSP, which updates the clsOrdersTS.Orders Business Entity (BE) object and, in turn, updates the database.

No attempt was made to optimize the client code that saves the performance data for analysis, because execution time for this code isn't included in the test results.

T-SQLScripts
------------
T-SQLScripts contains the following scripts:

daDetails.sql - The scripts for the daDetails SqlDataAdapter's designer-generated SelectCommand, InsertCommand, UpdateCommand, and DeleteCommand objects.

daOrders.sql - Similar scripts for the daOrder SqlDataAdapter

tsCreateSPs.sql and tsAlterSPs.sql - Scripts for the stored procedures for retrieving and updating data with the timestamp stored procedures.

tsCreatOrdersTS.sql - Scripts for creating the empty OrdersTS and OrderDetailsTS table. These scripts are derived from the Access 2003 (Beta) script for creating the NorthwindCS sample database.

tsFillOrdersTS.sql and tsFillDetailsTS.sql. These scripts fill the OrdersTS and OrderDetailsTS tables from data in the NorthwindCS sample database.

