DAT200 Microsoft ADO.NET for ADO Classic Developers: Introducing ADO.NET Jackie Goldstein...
-
Upload
julius-chapman -
Category
Documents
-
view
219 -
download
0
description
Transcript of DAT200 Microsoft ADO.NET for ADO Classic Developers: Introducing ADO.NET Jackie Goldstein...
DAT200Microsoft® ADO.NET for ADO Classic Developers: Introducing ADO.NET
Jackie GoldsteinRenaissance Computer [email protected]
Jackie Goldstein…General Manager of Renaissance Computer Systems
Consulting, Training, & Development, with Microsoft Tools & TechnologiesAuthor of “Database Access with Visual Basic.Net”
(ISBN 0-67232-3435, Addison-Wesley)MSDN Regional Director for IsraelFounder and monthly host of IVBUG (Israel Visual Basic User Group)Speaker at local & international developer conferences:
Microsoft Developer Days, TechEd, VSLive!, VBITS, VB DevCon, SQL2TheMax
Selected as SME (Subject Matter Expert) to help develop/review content for DevDays 2000 and DevDays 2001 with Microsoft team in Redmond
Session Topics
ADO.NET ArchitectureADO.NET Object ModelADO.NET and XMLSummary and Questions
Session Topics
ADO.NET ArchitectureADO.NET Object ModelADO.NET and XMLSummary and Questions
ADO.NET
ADO Look and Feel…Direct OLE DB connectivity…Integrated with .NET Framework…Integrated with XML…"Designed for the Enterprise"…
The .NET FrameworkApplications Are Built Using the Framework
Common Language Runtime
Memory Mgmt Type System Lifetime
System Base Classes
IO Threading Security ServiceProcess
Data Oledb SQLClient XML
System.Web
Web Services Web Forms
ASP Application Services
System.Windows.Forms
Controls Drawing
Windows Application Services
.NET Data Provider.NET Data Provider
DataReaderDataReader
CommandCommandConnectionConnection
SyncSync
Data In The .NET PlatformControls,Controls,
Designers,Designers,Code-gen, etcCode-gen, etc
DataSetDataSet
XmlReaderXmlReader
XmlText-XmlText-ReaderReader
XmlNode-XmlNode-ReaderReader
XSL/T, X-Path,XSL/T, X-Path,Validation, etcValidation, etc
XmlData-XmlData-DocumentDocument
Data-Data-AdapterAdapter
Points to Note in ADO.NET vs. ADOSeparation between connected data access model and disconnected programming modelNo CursorType, CursorLocation, or LockTypeADO Recordset functionality is split into smaller, specific objects, e.g. DataReader, DataTable, CommandADO.NET allows manipulation of XML data, not just XML as I/O format
Comparison Between ADO and ADO.NET (1) FeatureADOADO.NET
Memory-resident Data Representation
RecordSet can contain one table
DataSet can contain one or more tables represented by DataTable Object
Relationship Between Multiple Tables
Require the JOIN querySupports the DataRelation object
Data VisitationScans RecordSet rows sequentially
Uses a navigation paradigm for non-sequential access
Disconnected AccessProvided by RecordSet but typically supports connected access
Communicates with standardized calls to the DataAdapter
Comparison Between ADO and ADO.NET (2) FeatureADOADO.NET
Sharing Disconnected Data Between Tiers or Components
Uses COM marshalling to transmit disconnected record set
Transmits a DataSet with an XML file
Transmitting Data Through Firewalls
Problematic because firewall are typically configured to prevent system-level requests
Supported, DataSet object use XML, which can pass through firewalls
ScalabilityDatabase locks and active database connections for long durations
Disconnected access to database data without retaining database locks
Session Topics
ADO.NET ArchitectureADO.NET Object ModelADO.NET and XMLSummary and Questions
.NET Data ProvidersManage interaction to a data sourceMicrosoft Implementations
OLEDB .NET Data ProviderSQLServer .NET Data ProviderODBC .NET Data Provider Oracle .NET Data Provider
Main Objects:Connection, Command, ParameterDataReader, DataAdapter
Data Data StoreStore
DataDataProviderProvider
Using .NET Data Providers•Connection Object•Command Object•DataReader Object
demodemo
DataSet Object
DataSetDataSet
DataTableDataTable
DataTableDataTable
DataRowDataRow
DataColumnDataColumn
RelationsRelations
ConstraintsConstraintsXML SchemaXML Schema
DataAdapter Object
DataAdapterDataAdapter
SelectCommandSelectCommand
InsertCommandInsertCommand
UpdateCommandUpdateCommand
DeleteCommandDeleteCommand
TableMappingsTableMappings
DatabaseDatabase
DataSetDataSet
Using the DataAdapter•Simple Fill•Database Updates•Using the DataAdapter Configuration Wizard
demodemo
Strongly Typed DataSetDeal with DataSets, Tables, and Rows as Objects
Columns and Relations as propertiesClass Generated At Design Time
Inherits from DataSetSchema coded into the class
BenefitsCompile time type checking Statement completionConcise, readable code
Session Topics
ADO.NET ArchitectureADO.NET Object ModelADO.NET and XMLSummary and Questions
.NET Data Provider.NET Data Provider
DataReaderDataReader
CommandCommandConnectionConnection
SyncSync
Unified ArchitectureControls,Controls,
Designers,Designers,Code-gen, etcCode-gen, etc
DataSetDataSet
XmlReaderXmlReader
XmlText-XmlText-ReaderReader
XmlNode-XmlNode-ReaderReader
XSL/T, X-Path,XSL/T, X-Path,Validation, etcValidation, etc
XmlData-XmlData-DocumentDocument
Data-Data-AdapterAdapter
ADO.NET And XML (1)
The DataSetLoads/saves XML data into/out of DataSetSchema can be loaded/saved as XSDSchema can be inferred from XML Data
ADO.NET And XML (2) Data is XML is Data
XmlDataDocument unifies XML and DataSimultaneously exposes data relationally or as XMLExposes a relational view over structured XML
Plugs into entire stack of XML servicesSubclass of XmlDocument – it’s a DOMRetains fidelity of underlying document
Plugs into entire stack of Data servicesCan obtain a DataSet view of an XmlDataDocRelational and XML views stay in sync
Scenarios EnabledSimultaneously expose data relationally or as XML
Good for semi-structured dataMultiple tools on same data
Map interesting subset relationally using schema
Use natural object model for each subset
Both DOM and DataSet can “grow up”
Accessing XML Data•XML Navigation and Selection•XML Format in ADO.NET vs. ADO 2.X•Synchronization of Relational and XML Views of data
demodemo
Session Topics
ADO.NET ArchitectureADO.NET Object ModelADO.NET and XMLSummary and Questions
Session SummaryA natural evolution of ADODesigned with extensive XML supportClosely integrated with the .NET FrameworkProvides fast and efficient mechanisms for connected data access and disconnected data manipulationTry it – You’ll Like it !!!
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx
Suggested Reading And Resources
The tools you need to put technology to work!The tools you need to put technology to work!
TITLETITLE AvailableAvailable
Microsoft® ADO.NET (Core Microsoft® ADO.NET (Core Reference): 0-7356-1423-7Reference): 0-7356-1423-7 TodayToday
Microsoft Press books are 20% off at the TechEd Bookstore
Also buy any TWO Microsoft Press books and get a FREE T-Shirt
Ask The ExpertsGet Your Questions Answered
I will be in the Microsoft Ask The Experts area during the following hours:
Wednesday 13:00 – 14:00Thursday 13:00 – 14:00
evaluationsevaluations
Questions?
© 2003 Microsoft Corporation. All rights reserved.© 2003 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.