Java Reference
In-Depth Information
If it is successful, the application outputs a message like the following:
Database created in C:\Documents and Settings\Rogers\.database
Run the application again with “read” as the argument to read and display the contents of
the database:
java Presidents read
The application produces the following output:
Bill Clinton
15 Old House Lane
Chappaqua, NY 10514
(501) 370-8000
info@clintonpresidentialcenter.com
George Bush
Box 79798
Houston, TX 77279
(409) 260-9552
library@bush.nara.gov
George W. Bush
White House, 1600 Pennsylvania Ave.
Washington, DC 20500
(202) 456-1414
president@whitehouse.gov
18
Jimmy Carter
Carter Presidential Center
1 Copenhill, Atlanta, GA 30307
(404) 727-7611
carterweb@emory.edu
The presence of Java DB is one of the most noteworthy improvements in Java 6. The
availability of a relational database on all Java-equipped computers gives programmers a
chance to take advantage of persistent data storage.
For more information on Java DB, visit the Sun Microsystems website at http://develop-
ers.sun. com/prodtech/javadb.
Summary
Today you learned about working with data stored in popular database formats such as
Microsoft Access and Java DB. Using either Java Database Connectivity (JDBC) or a
combination of JDBC and ODBC, you can incorporate existing data-storage solutions
into your Java programs.
 
Search WWH ::




Custom Search