Figure 1.2 ODBC in the JDBC model. ODBC drivers function in the same manner as true JDBC drivers; in fact, the JDBC- ODBC bridge is actually a sophisticated JDBC driver that does low-level translation to and from ODBC. When the JDBC driver for a certain database becomes available, you can easily switch from the ODBC driver to the new JDBC driver with few, if any, changes to the code of the Java program. Summary The JDBC is not only a specification for using data sources in Java applets and applications, but it also allows you to create and use low-level drivers to connect and talk with data sources. You have now explored the JDBC architecture and seen how the ODBC fits into the picture. The important concept to remember about the JDBC is that the modular design of the JDBC interface allows you to change between drivers hence databases without recoding your Java programs. In the next chapter, we ll take a step back to give you a quick primer on SQL, one of the pillars of the JDBC. If you are already familiar with SQL-92, feel free to skip the chapter. However, I think that you may find the chapter helpful in clarifying the SQL queries performed in the sample JDBC programs we develop in this book. Chapter 2 SQL 101 SQL the language of database. This chapter s primary purpose is to serve as a primer on this data sublanguage. Although it would be impossible for me to cover the intricacies of SQL in just one chapter, I do intend to give you a solid introduction that we ll build on in the remainder of this book. Because the JDBC requires that drivers support the ANSI SQL-92 standard to be JDBC compliant, I ll be basing this chapter on that standard. SQL-92, which I ll refer to as SQL, is based on the relational model of database management proposed in 1970 by Dr. E.F. Codd; over time, SQL evolved into the full- featured language it is today, and it continues to evolve with our ever-changing needs.
Need a managed web hosting provider to help maintain your website? Our web hosting service is the preferred choice of thousands of demanding customers.