You are previewing Sams Teach Yourself Java in 21 Days, Sixth Edition.

Sams Teach Yourself Java in 21 Days, Sixth Edition

Cover of Sams Teach Yourself Java in 21 Days, Sixth Edition by Rogers Cadenhead Published by Sams
O'Reilly logo

Day 18. Accessing Databases with JDBC 4.1 and Derby

Almost all Java programs deal with data in some way. So far you have used primitive types, objects, arrays, hash tables, and other data structures.

Today, you work with data in a more sophisticated way by exploring Java Database Connectivity (JDBC), a class library that connects Java programs to relational databases.

Java 7 includes Java DB, a compact relational database that makes it easier than ever to incorporate a database into your applications. Java DB is Oracle’s name for Apache Derby, an open source database maintained by the Apache Software Foundation.

Today, you explore JDBC in the following ways:

• Using JDBC drivers to work with different relational databases

• Accessing a database ...

The best content for your career. Discover unlimited learning on demand for around $1/day.