You are previewing Essential ADO.NET.
O'Reilly logo
Essential ADO.NET

Book Description

"Essential ADO.NET is a comprehensive guide for developers of data-aware applications who want to transition to Microsoft's new .NET data access architecture. If you want to dig deep into the how's and why's of ADO.NET, this book will prove to be a worthy guide."

—Omri Gazitt, Product Manager of ADO.NET and Product Unit Manager, XML, Microsoft

"Bob Beauchemin packs a career's worth of knowledge into ten well-organized chapters, each one dense with information and insights. If you work with databases on Windows, buy this book."

—David Chappell, Principal of Chappell & Associates

Microsoft's ADO.NET enables Windows-based applications to access many types of databases from a variety of different vendors. This technology offers the advantage of cross-database flexibility that is essential for Internet and distributed-computing success.

Essential ADO.NET presents a thorough explanation of ADO.NET, exploring in depth the capabilities of classes, interfaces, properties, and methods. This book also examines the structure of data and demonstrates the ways in which ADO.NET can solve data access challenges. In particular, the discussion focuses on how ADO.NET effectively balances the need for generic functionality with efficiency, and how it is specifically designed to address today's need for scalability, concurrency, and robustness. A convenient reference for programmers moving from other data access APIs, including OLE DB, ADO, ODBC, and JDBC, Essential ADO.NET correlates classes and functions from these other APIs to those of ADO.NET.

You will find practical information on:

  • How the ADO.NET model can be used to access relational data stores

  • The DataSet class for in-memory data representation

  • How ADO.NET handles concurrency conflict-resolution problems

  • Guidelines for deciding when to use an online stream (DataReader) or offline cache (DataSet)

  • How to map database information using ASP.NET WebForm

  • How ADO.NET integrates relational data storage and XML representation with Microsoft's SQL Server

  • Essential ADO.NET is the most complete source of information for this crucial piece of the new Microsoft platform. Whether you are new to this application or have used it before, this book will help you to understand and get the most out of ADO.NET.



    0201758660B05132002

    Table of Contents

    1. Copyright
    2. Foreword by Tim Ewald
    3. Foreword by Richard Grimes
    4. Preface
    5. Acknowledgments
    6. Data: Models, Applications, and APIs
      1. Information, Data Modeling, and Databases
      2. Database and API Fundamentals
      3. The Relational Model
      4. Hierarchies, Objects, and Hybrids
      5. Data-centric Application Models
      6. Evolution of Data Access APIs
      7. Where Are We?
    7. ADO.NET Basics
      1. Data Access and the .NET Architecture
      2. Two Patterns of Data Access
      3. Connected Mode
      4. Disconnected Mode and the DataSet
      5. The XML APIs in .NET
      6. Layout of the Managed Data Classes
      7. Where Are We?
    8. The Connected Model: Streaming Data Access
      1. .NET Data Providers and the Connected Model
      2. Connection Classes
      3. Connection Pooling
      4. Metadata Methods
      5. Commands
      6. Using Parameters
      7. Command Preparation, Cancellation, Timeouts, and Cleanup
      8. Streaming Data through a DataReader
      9. Reading Column Values through IDataRecord
      10. Error Handling
      11. Using Transactions
      12. Permission Classes
      13. Where Are We?
    9. The DataSet Class: Sets of Relational Data
      1. DataSets
      2. The DataSet Object Model
      3. Defining an Information Schema
      4. Where Are We?
    10. DataAdapters: Synchronizing Databases and Datasets
      1. Optimistic Concurrency
      2. DataAdapter Classes
      3. Populating a DataSet from a Managed Provider
      4. How DataAdapter.Fill Works
      5. ADO Integration in OleDbDataAdapter
      6. Updating a Database through DataAdapter
      7. How Update Works
      8. The DataSet Event Model
      9. Writing General Customized Commands
      10. DataSets and Nonrelational Data Types Revisited
      11. Should You Use DataSet or DataReader?
      12. Where Are We?
    11. Data Binding: ADO.NET and Graphical User Interfaces
      1. Windows Forms and Web Forms
      2. Patterns of Data Presentation
      3. Using Databound Controls
      4. Data Binding with DataSets
      5. DataViews and Common Transformations
      6. Table and Column Mappings
      7. Editable List Controls: DataList and DataGrid
      8. Nonrelational Data and DataViews
      9. Integrating Visual Studio
      10. Controls and Data Forms
      11. Where Are We?
    12. XML and Data Access Integration
      1. XML and Traditional Data Access
      2. XML and ADO.NET
      3. Serialization, Marshaling, and DataSet
      4. Typed DataSets
      5. The XmlDataDocument Class
      6. Why Databases and XML?
      7. SQL Server, XML, and Managed Data Access
      8. Using SQLXML and .NET
      9. Where Are We?
    13. Providers: ADO.NET and Data Providers
      1. What Are Your Choices?
      2. Staying with OLE DB: A Summary of OLE DB Concepts
      3. Staying with OLE DB: Interaction with the OleDb Data Provider
      4. Writing a Data Provider
      5. Implementing the Connection Class
      6. Implementing the Command Class
      7. Implementing the DataReader Class
      8. Implementing the DataAdapter Class
      9. Adding Enhanced Functionality
      10. Implementing XML Infoset Providers
      11. Implementing XmlReader
      12. Implementing XPathNavigator
      13. Implementation Alternatives: Conclusions
      14. Is a Single Universal Data Access Model Possible?
      15. Where Are We?
    14. Consumers: ADO.NET Migration for Consumers
      1. ADO.NET Migration Paths
      2. ADO.NET for OLE DB Programmers
      3. A Brief Overview of ADO
      4. ADO.NET for ADO Programmers
      5. ADO Connections, Commands, and Transactions
      6. ADO.NET Versus ADO Disconnected Model
      7. ADO DB Interoperability
      8. ADO.NET for ODBC Programmers
      9. ADO.NET for JDBC Programmers
      10. ADO.NET JDBC Programmers and the Disconnected Model
      11. SQL/J Part 0 and Typed DataSets
      12. Where Are We?
    15. ADO.NET and Various Types of Data
      1. Evolution in Data Access
      2. ADO.NET with Server- and File-Based RDBMS
      3. ADO.NET with Homogeneous Hierarchical Data and ORDBMS
      4. ADO.NET and Network Data: Object Graphs, ODBMS, and Network DBMS
      5. ADO.NET and Structured Files, Multidimensional Data, and ORDBMS
      6. ADO.NET Flat Files and Semistructured Files
      7. Where Are We Going?
    16. Data Types and Type Mappings
      1. DbType Enumeration
      2. Mapping SQL Server Data Types to SqlTypes and SqlDbTypes
      3. Mapping of OLE DB DBTYPEs to .NET data types
      4. Mapping of ODBC Types
      5. Parameter.DbType
    17. Expression Syntax
      1. User-Defined Values
      2. Operators
      3. String Operators
      4. Wildcard Characters
      5. Parent/Child Relation Referencing
      6. Aggregates
      7. Functions
    18. Schema Inference Rules
      1. Excluding Information
      2. Summary of the Inference Process
      3. Tables
      4. Elements with Attributes
      5. Elements with Child Elements
      6. Repeating Elements
      7. Columns
      8. Attributes
      9. Elements without Attributes or Child Elements
      10. Relationships
      11. Element Text
      12. Limits
    19. Bibliography