413C2. ADO.NET Using Oracle
and C#
Rev. 2.0
This three-day course teaches the essential elements of ADO.NET such
that at the end of the course the programmer is able to utilize its tremendous
database manipulation powers to build effective database applications. The
course includes a major case study demonstrating the use of ADO.NET in a
realistic setting. Both Windows and Web front-end user interfaces are
presented, and there are corresponding parallel tracks in the case study. The
course uses Oracle as the database and includes coverage of the Oracle Data
Provider for .NET (ODP.NET). The course is current to .NET 2.0, Visual Studio
2005 and Oracle 10g.
The course opens with a discussion of the basics of database
applications. The database for the case study is introduced. The fundamentals
of ADO.NET are presented, including a discussion of ADO.NET architecture, main
interfaces and classes, and programming with the connected model using
DataReaders. Command objects are covered in detail, including the use of stored
procedures.
Then the course focuses on the backbone of ADO.NET: DataSet and its
related classes, such as DataAdapter, DataTable, DataRow, DataColumn,
DataRelation, TableMappings and ColumnMappings. DataSet is able to handle
multiple tables while remaining disconnected. It is eminently suited for
building highly scalable applications for the Web.
The close relationship between ADO.NET and XML is covered in detail.
There is a practical discussion of data binding and its use in both Windows
Forms and Web Forms (ASP.NET) applications. Students will gain a familiarity
with creating a Data Access Layer, as it applies to traditional three-tier
application architecture, and will learn how to use it in their code.
LEARNING OBJECTIVES
·
Understand the architecture and main classes of
ADO.NET
·
Gain fluency in programming ADO.NET using C#
·
Gain a thorough understanding of the use of
disconnected DataSets for building highly scalable applications
·
Acquire a working knowledge of the tight
coupling of XML with ADO.NET
·
Implement a realistic case study that ties
together all the concepts of ADO.NET in a practical demonstration
Course Duration: 3
days
Prerequisites: A basic
knowledge of SQL and of programming the .NET Framework using C#. The student
should also understand the fundamentals of XML. To get full benefit from the
case studies in the course, the student should be able to write simple Windows
Forms and Web Forms applications. A working knowledge of Oracle is also
required.
1.
Database Application Basics
Data Modeling
Performance Considerations
Conceptual Design and the Data Layer
APIs
2.
ADO.NET Fundamentals
ADO.NET Overview
.NET Data Providers
Connections
Error Handling
DataReaders
IDataReader
IDataRecord
Type-Safe Accessors
Null Columns
3.
ADO.NET Commands
IDbCommand
Command Objects
Creating Commands
Executing Commands
Parameterized Queries
Command Types
Using Stored Procedures
Using Oracle REF CURSOR
4.
Data Sets and Disconnected Access
DataSet
DataAdapter
Command Objects
DataTable
DataColumn
DataRow
Row States and Versions
Accept or Reject Changes
DataTable Events
Updating a Database from a DataSet
Command Builders
Filtering DataTables
5.
XML and ADO.NET
Strong Coupling Between ADO.NET and XML
Rendering XML from a
DataSet
Controlling XML Output
Reading XML into a
DataSet
XML Schema and DataSets
Typed DataSets
Synchronizing DataSets
and XML
XML Serialization
6.
Data Binding
DataView
Data Binding in Windows Forms
Simple Data Binding
DataGrid Binding
Master Detail Binding
Data Binding in Web Forms
7.
Creating and Using a Data Access Layer
Three-Tier Applications
Creating a Data Access Layer
Implementing the Business Logic
Creating the User Interface
Appendix A. Acme Computer Case Study
Appendix B. Learning Resources
System Requirements
Course exercises require Visual Studio 2005, the Oracle Data
Provider for .NET (ODP.NET), and Oracle RDBMS 10g Express Edition. See the appropriate course Setup Guide for
details.
A good minimal hardware profile for this course would have a Pentium
1 GHz or equivalent CPU, 512 MB of RAM, and at least 5 GB of free disk space
for operating system, tools installation, and courseware.