A Phase-to-Phase Guide to the Duwamish Books Data Access Strategy

Phase 1

Phase 1

Application Code
Schema-aware code accesses data:
• Access SQL (Select, Insert, and Update)
• ISAM-style data manipulation (AddNew . . . Update)

Data Access
Code in the desktop applications
• ADO 1.5
• Access ODBC driver

Database
Microsoft Access 97 .mdb file format database
Simple schema representing business model (not highly normalized)

Read
"Designing a Simple Retail-Oriented Database"


Phase 2

Phase 2

Application Code
Access data through Data Access Layer API
DAL.ExecQuery and GetRecordset (schema-aware Access SQL)
TransactedRecordset (ISAM-style for transactions requiring multiple trips)

Data Access
Data access code broken out into Data Access Layer (DAL) component
• ExecQuery, GetRecordset, TransactRecordset
• ADO 1.5
• Access ODBC driver

Database
Database schema extended to support multiple stores
Schema modifications at inventory hot spot

Read
"Designing a Data Access Layer"
"Modeling a Distributed Inventory: Duwamish Books, Phase 2"
"Breaking Out the Data Access Layer"
"Duwamish Books Data Access Layer API, Phase 2"
"Migrating a Visual Basic 5.0 Component to Visual C++ 5.0"


Phase 3

Phase 3

Application Code
All data access through Business Logic Layer API (GetCustomer, InsertOrder, . . .)
ADO 2.0 hierarchical disconnected recordsets

Business Logic
Business logic broken out into Business Logic Layer (BLL) component
• API encapsulates database schema
• Executes stored procedures in the database through the DAL.
• Minimizes round trips and maximizes scalability.

Data Access
SQL Server ODBC driver
ADO 2.0.
DAL API revised to simplify complex transactions

Database
SQL Server 6.5
Stored procedures used exclusively for all data access and manipulation
Simple Phase 2 schema remains

Read
"Migrating the Duwamish Books Database to SQL Server"
"Duwamish Data Access Layer Shifts into Phase 3"
"Abstracting Business Transactions"

Phase 3.5

Business Logic
OLE Transactions brokered by MTS

Data Access
MTS takes over management of ADO/ODBC connection(s)

Read
"Moving a Data Access Layer into Microsoft Transaction Server"
"Distributing Duwamish Books with Microsoft Transaction Server"
"Remoting Duwamish Components"
"Hoisting the Duwamish Components into MTS"


Phase 4

Phase 4

Presentation Layer
Three client types (HTML 3.2, Internet Explorer 4.0 DHTML with data binding , and Internet Explorer 5 DHTML, XML/XSL)
XMLDOM transforms XML data to HTML using XSL for separation of data and presentation

Workflow Layer
Cache infrequently changing data as XML/HTML
Transform data from ADO 2.1 disconnected recordsets to XML
Store user context data as XML in location-independent manner (cookie, session state, or back end)

Business Logic Layer
Revised interfaces optimized for scalability
Microsoft English Query transforms English to SQL

Data Access
SQL Server ODBC driver
ADO 2.1
MTS manages ADO/ODBC connection(s)

Database
SQL Server 7.0
Modified schema for increased scalability and performance

Read
"Data Flow Through Duwamish Books"
"Three Approaches for Three Client Types"
"Workflow Design for a Web Commerce Application"
"Creating a Page Cache Object"