Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chris Menegay Sr. Consultant TECHSYS Business Solutions

Similar presentations


Presentation on theme: "Chris Menegay Sr. Consultant TECHSYS Business Solutions"— Presentation transcript:

1

2 Chris Menegay Sr. Consultant TECHSYS Business Solutions
Data Access Patterns Chris Menegay Sr. Consultant TECHSYS Business Solutions

3 Agenda Data Access Methodology Techniques for Data Access Summary
Data Access Layer Techniques for Data Access ADO.NET Datasets Datareaders Microsoft Data Access Application Blocks SQLXML Summary

4 Data Most applications deal with data that is persisted in some manner
RDBMS Flat file Mainframe XML Need a consistent way to write code to take application data and persist it.

5 Selecting a Solution There is more than one ‘right way’
You are part of the answer… …your skills …your background …your familiarity What are you doing with the data? Does it contain business logic? What tools are you using with it? What is the destination of the data? Are you exchanging it with other partners? What type of project are you working on? Self-contained app versus enterprise framework

6 Layered Architecture Pattern
Users Operational Management Security Communication UI Components UI Process Components Service Interfaces Business Workflows Business Components Business Entities Data Access Components Service Agents Data Sources Services

7 Data Access Layer Contains all data access code.
Contains only data access code. Does not contain business code. Does not contain UI code. Tip: Use IDBConnection, IDBCommand, etc.

8 Q: Why am I doing this? Consistency and Maintenance
It scales – works for small applications as well as large ones Never have to wonder ‘where is all the code that accesses the customer table?’ Tip: you can code generate a lot of this

9 Data Access Layer

10 ADO.NET Data Access Support
Data is relational is objects is XML is Data Technology Strengths Use if… DataSet and DataReader in ADO.NET Relational (tabular) model Highest performance Explicit control Fully exposes database functionality You are comfortable with the relational model You require maximum control/performance/functionality You are using UI bound controls Interoperability. Format for the Web – B2B, A2A Sparse (semi-structured) data XML Services e.g. XQuery, XSD Relational mapping via metadata Decoupled from database schema You need to query data from XML data sources e.g. XML Web Services You use vertical industry XML schemas for content publishing e.g. XBRL, RIXML, FinXML You need to load XML documents into database tables You are using UI bound controls for XML SQLXML in ADO.NET

11 DataSets And Datareaders
Use Datasets for: Holding data in memory – great for winforms applications with databinding. Allow sorting and filtering at the client Combine results from multiple stores Use Datareaders for: Read once data Speed

12 Data Access Helpers

13 Why a helper block? Consistent mechanism for accessing data
Simplifies code

14 Microsoft Data Access Application Block

15 DataSets And Data Providers
Overview Architecture Scenarios Demo

16 .NET Data Providers: Overview
Goal: Integrate manipulation of relational data with the .NET Framework Accessing a Relational Store (.NET Data Providers) Connecting, Executing Commands, Retrieving Results Explicit Architecture Provided a defined interface: IDBConnection IDBCommand, etc Predictable behavior, semantics Optimized performance

17 DataSet And Data Providers: Architecture
DataAdapter .NET Data Provider DataReader Command Connection

18 Data Providers & Helper Blocks

19 SQLXML Overview Architecture Scenarios Demo

20 SQLXML: Overview Growing number of applications unifying under XML based interfaces Loose coupling Coping with decentralized data Managing sparse (semi-structured) data SQLXML supports XML over SQLServer XML programming model for queries and updates XQuery(Whidbey) - Full fledged XML query language XML Views Mapping technology to expose logical XML views of SQL Server relational tables XML Views provide XQuery support over SQL Server.

21 ADO.NET With SQLXML

22 SQLXML: Scenarios Represent data as XML Source and sink for XML
Content management systems, B2B scenarios Queries and updates against XML Views Loading large XML data sets Bulk load data into existing relational table structure E.g. Catalog information Transfer data as XML between databases Agree on transfer format Apply mappings at either end

23 SQLXML

24 Summary It’s all about DATA…
Plan how you want to access/maintaing your data Structure your code! Understand the strengths of each technology DataSet and Datareader Relational Model Ultimate Performance, Control SQLXML XML Model Interoperable, self-describing format Pick the technology appropriate to your scenario How results will be used Tools to be applied Your knowledge/comfort level

25 Call To Action Take the next step with SQL Server and .NET data access. Sign up to meet with the MS technical team to discuss an architectural design session or a proof of concept. For more information, please You can download all presentations at

26 SQL Server Summit Brought To You By:

27 © 2004 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.


Download ppt "Chris Menegay Sr. Consultant TECHSYS Business Solutions"

Similar presentations


Ads by Google