
Essential ADO.NET
Bob Beauchemin(Author)
Addison Wesley (Publisher)
Published on 11. June 2002
Book
Paperback/Softback
560 pages
978-0-201-75866-5 (ISBN)
Description
Discover what makes ADO.NET uniquely powerful -- and how you can use it to solve Web development problems that couldn't easily be solved with previous data access technologies. Beauchemin begins by outlining the tasks a contemporary data access API must address, explaining the ADO.NET capabilities that are truly novel, and describing the data storage styles and application types ADO.NET is best suited for. Next, using simple examples, he introduces each key component of ADO.NET: its data providers, DataSet object model, and XML data access model. Beauchemin explains how ADO.NET varies from the provider model common to traditional data access technologies, and introduces new features such as connection pooling and automatic distributed transactions. He presents in-depth coverage of ADO.NET DataAdapters, and offers detailed guidance on when to use a direct-from-the-database stream (the ADO.NET Data Reader) and when to use an offline cache. The book contains extensive coverage of data binding, XML and data access integration, XML data providers, data consumers moving from other data access APIs, and finally, the future of data access.
For everyone building database applications with Microsoft technologies -- including more than two million Visual Basic developers who rely on ADO and need to understand the technology that is supplanting it. Foreword by Tim Ewald.
For everyone building database applications with Microsoft technologies -- including more than two million Visual Basic developers who rely on ADO and need to understand the technology that is supplanting it. Foreword by Tim Ewald.
More details
Language
English
Place of publication
Boston
United States
Publishing group
Pearson Education (US)
Target group
College/higher education
Dimensions
Height: 235 mm
Width: 188 mm
Thickness: 25 mm
Weight
835 gr
ISBN-13
978-0-201-75866-5 (9780201758665)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Person
Bob Beauchemin is a database-centric application practitioner and architect, DBA, instructor, course author, and writer. He's Director of Developer Skills at SQLskills (www.sqskills.com), and teaches his SQL Server 2005 courses around the world. Bob has written extensively on SQL Server and other databases, database security, ADO.NET, and OLE DB.
Content
Foreword by Tim Ewald.
Foreword by Richard Grimes.
Preface.
Acknowledgments.
1. Data: Models, Applications, and APIs.
Information, Data Modeling, and Databases.
Database and API Fundamentals.
The Relational Model.
Relational Design Rules.
Benefits of the Relational Model.
Relational Model Support in ADO.NET.
Hierarchies, Objects, and Hybrids.
Modern Nonrelational Data.
Multidimensional Data.
Nonrelational Data and ADO.NET.
XML and the Infoset.
XML, Databases, and Universal Data Representation.
Data-centric Application Models.
Evolution of Data Access APIs.
Where Are We?
2. ADO.NET Basics.
Data Access and the .NET Architecture.
Two Patterns of Data Access.
Connected Mode.
OleDb and SqlClient Data Providers.
Writing Generic Data Access Code with ADO.NET Data Providers.
Cursors in the Data Provider Model.
Disconnected Mode and the DataSet.
The XML APIs in .NET.
Streaming XML.
XML Schemas.
The XmlDocument, XPath, and XPathNavigators.
Mixing XML and Data Providers.
Layout of the Managed Data Classes.
Where Are We?
3. The Connected Model: Streaming Data Access.
.NET Data Providers and the Connected Model.
Connection Classes.
Connection Pooling.
Metadata Methods.
Commands.
Command Behaviors.
Using Parameters.
Command Preparation, Cancellation, Timeouts, and Cleanup.
Streaming Data through a DataReader.
Reading Column Values through IDataRecord.
Handling Large Data Columns.
Error Handling.
Using Transactions.
Distributed Transactions.
How Connection Pooling Works.
How Declarative Transactions Work.
Permission Classes.
Database Security.
Where Are We?
4. The DataSet Class: Sets of Relational Data.
DataSets.
DataSet as an In-memory Database.
What Can You Do with a DataSet?
The DataSet Object Model.
DataColumns, DataRows, and DataTables.
DataTable and Its Uses.
DataRows.
Keys, Relations, and Constraints.
Navigating through Relationships: Select and Find.
Adding, Retrieving, Changing, and Deleting Rows.
Combining Changes.
Merging DataSets.
DataRow States and Versions.
Rules and Relationships.
Error Handling.
Events.
DataSets and Nonrelational Types.
Defining an Information Schema.
Where Are We?
5. DataAdapters: Synchronizing Databases and Datasets.
Optimistic Concurrency.
DataAdapter Classes.
Populating a DataSet from a Managed Provider.
Using Fill with Schema and Mapping Information.
Error Handling during DataAdapter.Fill.
How DataAdapter.Fill Works.
ADO Integration in OleDbDataAdapter.
Updating a Database through DataAdapter.
The CommandBuilder Class.
Coding Update Logic Directly.
How Update Works.
Controlling Updates.
The DataSet Event Model.
Refreshing DataSet Using Update and Merge.
Writing General Customized Commands.
The ADOX CommandBuilder.
Building a Batch Update Command.
DataSets and Nonrelational Data Types Revisited.
Should You Use DataSet or DataReader?
Where Are We?
6. Data Binding: ADO.NET and Graphical User Interfaces.
Windows Forms and Web Forms.
Patterns of Data Presentation.
Using Databound Controls.
Web Forms Data Binding Types.
Anatomy of Databound Control Types.
Binding to a DataReader.
Data Binding with DataSets.
DataViews and Common Transformations.
Table and Column Mappings.
Editable List Controls: DataList and DataGrid.
DataList.
DataGrid.
Nonrelational Data and DataViews.
Integrating Visual Studio.
Server Explorer and Data Toolbox.
Controls and Data Forms.
Where Are We?
7. XML and Data Access Integration.
XML and Traditional Data Access.
XML and ADO.NET.
Defining a DataSet's Schema.
Refining DataSet's XML Schema.
Reading XML into DataSet.
Writing XML Schemas from DataSet.
Microsoft-Specific Annotations.
Writing XML Data from DataSet.
Serialization, Marshaling, and DataSet.
Typed DataSets.
The XmlDataDocument Class.
XmlDataDocuments and DataSets.
XmlDataDocument and DataDocumentXPathNavigator.
Why Databases and XML?
XML as a Distinct Type.
Document Composition and Decomposition.
SQL Server, XML, and Managed Data Access.
The FOR XML Keyword.
OpenXML.
The SQLOLEDB Provider.
The SqlXml Managed Classes.
The SQLXML Web Application.
Updategrams.
FOR XML in the SQLXMLOLEDB Provider.
Bulk Loading.
Future Support.
Using SQLXML and .NET.
Where Are We?
8. Providers: ADO.NET and Data Providers.
What Are Your Choices?
Staying with OLE DB: A Summary of OLE DB Concepts.
Staying with OLE DB: Interaction with the OleDb Data Provider.
Main Cotypes and Type Mapping.
Accessors.
Executing Commands, Returning Results, and Using OpenRowset.
Command Results Format and Behaviors.
Command Dialects.
Hierarchical Data.
Updating from a Rowset.
Errors.
Unsupported Functions.
Supported and Unsupported Providers.
Writing a Data Provider.
Implementing the Connection Class.
Specification.
Implementation.
Specialization.
Implementing the Command Class.
Specification.
Implementation.
Specialization.
Implementing the DataReader Class.
Specification.
Implementation.
Specialization.
Implementing the DataAdapter Class.
Specification.
Implementation.
Specialization.
Adding Enhanced Functionality.
Implementing XML Infoset Providers.
Implementing XmlReader.
Implementing XPathNavigator.
Implementation Alternatives: Conclusions.
Is a Single Universal Data Access Model Possible?
Where Are We?
9. Consumers: ADO.NET Migration for Consumers.
ADO.NET Migration Paths.
ADO.NET for OLE DB Programmers.
Cotype Equivalents.
Data Provider Transparency.
Using Provider-Specific Functionality.
Error Handling.
System-Supplied Services.
System-Supplied Components.
Service Providers.
Marshaling.
A Brief Overview of ADO.
ADO.NET for ADO Programmers.
Class Equivalences.
ADO Connections, Commands, and Transactions.
Connections and Connection Strings.
Using Transactions.
Commands and Command Behaviors.
Hierarchical Data.
Asynchronous Operations.
Properties.
ADO.NET Versus ADO Disconnected Model.
Class Equivalents.
Navigation.
What Happened to GetRows in ADO.NET?
Updates.
Update Statement Creation.
Batch Updates.
ADO.NET DataSet Extensions.
Column and Table Naming.
Sorting and Filtering.
ADO DB Interoperability.
ADO.NET for ODBC Programmers.
Handles and Environment.
Commands.
Fetching Data.
Metadata and Schema Information.
Errors.
ADO.NET for JDBC Programmers.
Generic Code.
Provider Types.
Connection Pooling.
Nonrelational Data Types.
Object Databases.
Other SQL-99 Extensions.
Metadata.
Transactions.
Commands and Behaviors.
Executing Queries and Returning Results.
Server Cursors.
Errors.
ADO.NET JDBC Programmers and the Disconnected Model.
SQL/J Part 0 and Typed DataSets.
Where Are We?
10. ADO.NET and Various Types of Data.
Evolution in Data Access.
ADO.NET with Server- and File-Based RDBMS.
ADO.NET with Homogeneous Hierarchical Data and ORDBMS.
ADO.NET and Network Data: Object Graphs, OODBMS, and Network DBMS.
ADO.NET and Structured Files, Multidimensional Data,and ORDBMS.
ADO.NET Flat Files and Semistructured Files.
Where Are We Going?
Appendix A. Data Types and Type Mappings.
Appendix B. Expression Syntax.
Appendix C. Schema Inference Rules.
Bibliography.
Index. 0201758660T05132002
Foreword by Richard Grimes.
Preface.
Acknowledgments.
1. Data: Models, Applications, and APIs.
Information, Data Modeling, and Databases.
Database and API Fundamentals.
The Relational Model.
Relational Design Rules.
Benefits of the Relational Model.
Relational Model Support in ADO.NET.
Hierarchies, Objects, and Hybrids.
Modern Nonrelational Data.
Multidimensional Data.
Nonrelational Data and ADO.NET.
XML and the Infoset.
XML, Databases, and Universal Data Representation.
Data-centric Application Models.
Evolution of Data Access APIs.
Where Are We?
2. ADO.NET Basics.
Data Access and the .NET Architecture.
Two Patterns of Data Access.
Connected Mode.
OleDb and SqlClient Data Providers.
Writing Generic Data Access Code with ADO.NET Data Providers.
Cursors in the Data Provider Model.
Disconnected Mode and the DataSet.
The XML APIs in .NET.
Streaming XML.
XML Schemas.
The XmlDocument, XPath, and XPathNavigators.
Mixing XML and Data Providers.
Layout of the Managed Data Classes.
Where Are We?
3. The Connected Model: Streaming Data Access.
.NET Data Providers and the Connected Model.
Connection Classes.
Connection Pooling.
Metadata Methods.
Commands.
Command Behaviors.
Using Parameters.
Command Preparation, Cancellation, Timeouts, and Cleanup.
Streaming Data through a DataReader.
Reading Column Values through IDataRecord.
Handling Large Data Columns.
Error Handling.
Using Transactions.
Distributed Transactions.
How Connection Pooling Works.
How Declarative Transactions Work.
Permission Classes.
Database Security.
Where Are We?
4. The DataSet Class: Sets of Relational Data.
DataSets.
DataSet as an In-memory Database.
What Can You Do with a DataSet?
The DataSet Object Model.
DataColumns, DataRows, and DataTables.
DataTable and Its Uses.
DataRows.
Keys, Relations, and Constraints.
Navigating through Relationships: Select and Find.
Adding, Retrieving, Changing, and Deleting Rows.
Combining Changes.
Merging DataSets.
DataRow States and Versions.
Rules and Relationships.
Error Handling.
Events.
DataSets and Nonrelational Types.
Defining an Information Schema.
Where Are We?
5. DataAdapters: Synchronizing Databases and Datasets.
Optimistic Concurrency.
DataAdapter Classes.
Populating a DataSet from a Managed Provider.
Using Fill with Schema and Mapping Information.
Error Handling during DataAdapter.Fill.
How DataAdapter.Fill Works.
ADO Integration in OleDbDataAdapter.
Updating a Database through DataAdapter.
The CommandBuilder Class.
Coding Update Logic Directly.
How Update Works.
Controlling Updates.
The DataSet Event Model.
Refreshing DataSet Using Update and Merge.
Writing General Customized Commands.
The ADOX CommandBuilder.
Building a Batch Update Command.
DataSets and Nonrelational Data Types Revisited.
Should You Use DataSet or DataReader?
Where Are We?
6. Data Binding: ADO.NET and Graphical User Interfaces.
Windows Forms and Web Forms.
Patterns of Data Presentation.
Using Databound Controls.
Web Forms Data Binding Types.
Anatomy of Databound Control Types.
Binding to a DataReader.
Data Binding with DataSets.
DataViews and Common Transformations.
Table and Column Mappings.
Editable List Controls: DataList and DataGrid.
DataList.
DataGrid.
Nonrelational Data and DataViews.
Integrating Visual Studio.
Server Explorer and Data Toolbox.
Controls and Data Forms.
Where Are We?
7. XML and Data Access Integration.
XML and Traditional Data Access.
XML and ADO.NET.
Defining a DataSet's Schema.
Refining DataSet's XML Schema.
Reading XML into DataSet.
Writing XML Schemas from DataSet.
Microsoft-Specific Annotations.
Writing XML Data from DataSet.
Serialization, Marshaling, and DataSet.
Typed DataSets.
The XmlDataDocument Class.
XmlDataDocuments and DataSets.
XmlDataDocument and DataDocumentXPathNavigator.
Why Databases and XML?
XML as a Distinct Type.
Document Composition and Decomposition.
SQL Server, XML, and Managed Data Access.
The FOR XML Keyword.
OpenXML.
The SQLOLEDB Provider.
The SqlXml Managed Classes.
The SQLXML Web Application.
Updategrams.
FOR XML in the SQLXMLOLEDB Provider.
Bulk Loading.
Future Support.
Using SQLXML and .NET.
Where Are We?
8. Providers: ADO.NET and Data Providers.
What Are Your Choices?
Staying with OLE DB: A Summary of OLE DB Concepts.
Staying with OLE DB: Interaction with the OleDb Data Provider.
Main Cotypes and Type Mapping.
Accessors.
Executing Commands, Returning Results, and Using OpenRowset.
Command Results Format and Behaviors.
Command Dialects.
Hierarchical Data.
Updating from a Rowset.
Errors.
Unsupported Functions.
Supported and Unsupported Providers.
Writing a Data Provider.
Implementing the Connection Class.
Specification.
Implementation.
Specialization.
Implementing the Command Class.
Specification.
Implementation.
Specialization.
Implementing the DataReader Class.
Specification.
Implementation.
Specialization.
Implementing the DataAdapter Class.
Specification.
Implementation.
Specialization.
Adding Enhanced Functionality.
Implementing XML Infoset Providers.
Implementing XmlReader.
Implementing XPathNavigator.
Implementation Alternatives: Conclusions.
Is a Single Universal Data Access Model Possible?
Where Are We?
9. Consumers: ADO.NET Migration for Consumers.
ADO.NET Migration Paths.
ADO.NET for OLE DB Programmers.
Cotype Equivalents.
Data Provider Transparency.
Using Provider-Specific Functionality.
Error Handling.
System-Supplied Services.
System-Supplied Components.
Service Providers.
Marshaling.
A Brief Overview of ADO.
ADO.NET for ADO Programmers.
Class Equivalences.
ADO Connections, Commands, and Transactions.
Connections and Connection Strings.
Using Transactions.
Commands and Command Behaviors.
Hierarchical Data.
Asynchronous Operations.
Properties.
ADO.NET Versus ADO Disconnected Model.
Class Equivalents.
Navigation.
What Happened to GetRows in ADO.NET?
Updates.
Update Statement Creation.
Batch Updates.
ADO.NET DataSet Extensions.
Column and Table Naming.
Sorting and Filtering.
ADO DB Interoperability.
ADO.NET for ODBC Programmers.
Handles and Environment.
Commands.
Fetching Data.
Metadata and Schema Information.
Errors.
ADO.NET for JDBC Programmers.
Generic Code.
Provider Types.
Connection Pooling.
Nonrelational Data Types.
Object Databases.
Other SQL-99 Extensions.
Metadata.
Transactions.
Commands and Behaviors.
Executing Queries and Returning Results.
Server Cursors.
Errors.
ADO.NET JDBC Programmers and the Disconnected Model.
SQL/J Part 0 and Typed DataSets.
Where Are We?
10. ADO.NET and Various Types of Data.
Evolution in Data Access.
ADO.NET with Server- and File-Based RDBMS.
ADO.NET with Homogeneous Hierarchical Data and ORDBMS.
ADO.NET and Network Data: Object Graphs, OODBMS, and Network DBMS.
ADO.NET and Structured Files, Multidimensional Data,and ORDBMS.
ADO.NET Flat Files and Semistructured Files.
Where Are We Going?
Appendix A. Data Types and Type Mappings.
Appendix B. Expression Syntax.
Appendix C. Schema Inference Rules.
Bibliography.
Index. 0201758660T05132002