Chapter 5. Database Programming
While SQL plays an important role in
standardizing the communication with different RDBMSs, a missing
piece still remains for those who want to write database software
applications. The missing piece is the database programming
Application Programming Interface (API) used to transport SQL
statements to and process their results from an RDBMS. While all the
database platforms discussed in this book provide their own
proprietary interfaces for database application developers, this
chapter focuses on two commonly used APIs that provide a consistent
interface across database platforms. Specifically, this chapter
introduces you to:
ADO.NET is Microsoft's high-level database
programming API on the .NET platform. The ADO.NET API is a collection
of .NET interfaces that are accessible from any of the .NET
languages. The primary benefits of ADO.NET are ease of use,
portability within the .NET platform, XML integration, and access to
data sources other than relational databases. The ADO.NET examples
covered in this book are written in C#; however, ADO.NET is also
available from Visual Basic and the other .NET languages.
JDBC, or Java Database
Connectivity, was developed primarily by Sun Microsystems
to be the primary database programming API for the Java language.
JDBC is the most popular database programming API for the Java
language and offers operating-system portability, reasonable
performance for most applications, and a well-documented interface.
In addition, drivers for most database systems are typically free.
This chapter covers JDBC Version 3.0. For additional information,
please browse http://java.sun.com/jdbc.
As a quick desk reference, this chapter won't
provide all the information needed to develop a large enterprise
database application. However, we give you enough to get started by
covering components that are common to all database applications,
both large and small.