Java Reference
In-Depth Information
Q: Where do I get these drivers?
A: Typically, the manufacturer of your database provides you with
one. As Java has become more and more popular, more and more
database vendors provide efficient, robust JDBC drivers so Java
applications can take advantage of the features of the database.
Q: What if I use a database that does not provide a JDBC driver?
A: Not to worry. There are plenty of third-party drivers available for all
types of databases. JDBC drivers exist for virtually every possible
type of database access you will ever need, and virtually every
database. In the next section, JDBC Drivers , I discuss the various
types of drivers and where you can find them.
Q: Is the driver a separate program that I need to download?
A: It depends on the type of driver. A database driver is a class, and to
use a driver you need to make sure the class for the driver is loaded
by your JVM and registered with the DriverManager class, which I
discuss in detail in the upcoming section Connecting to a Database .
Some drivers require a separate application to be running.
Q: You mentioned JDBC works on databases that use a tabular
format. What does that mean?
A: Tabular format means the data is stored in tables. Most databases
store their contents by using tables. In fact, a database can be
thought of as a collection of tables, where a table is a collection of
rows, and a row is a collection of columns. The items in the
columns represent the actual contents of the database. You will
soon find out that the JDBC API contains many methods for
accessing the rows and columns of database tables.
Q: You mentioned SQL is used to communicate with a database. Do
I need to learn SQL to use JDBC?
A: Yes! Although JDBC may eventually eliminate the need to learn
SQL, right now SQL is the de facto means for accessing the con-
tents of a database. If you are new to database programming, I
might as well let you in on what database programmers have
known for years: You need to know SQL. JDBC provides you with
a mechanism for connecting to a database, but the actual access
to the data in the database is done using SQL.
Search WWH ::




Custom Search