13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

15.9 Resources337We haven’t covered the basic Statement class suitable for fixed querieswith no parameters (instead we used PreparedStatement which will workwith or without parameters), nor have we discussed the CallableStatementclass for calling stored procedures in the database. With what you know now,though, you should be able to glean enough informati<strong>on</strong> from the Javadocpages <strong>on</strong> these classes to do what you need, as they are similar to thePreparedStatment class.RowSets extend ResultSet to include mechanisms for listening for datachanges and for JavaBeans functi<strong>on</strong>ality. But again, Javadoc informati<strong>on</strong> or acomprehensive book <strong>on</strong> the subject would be a good next step, now that youhave the basics in hand.We haven’t covered the ResultSetMetaData class, which provides a wayfor you to get the names of the columns that come back from the query. Again,check the Javadoc for details <strong>on</strong> its use.We also haven’t said anything about transacti<strong>on</strong>s, a key element in manydatabase applicati<strong>on</strong>s. We’ll say more about that as we get into the enterprisescaleapplicati<strong>on</strong>s.What we have covered should enable you to c<strong>on</strong>nect to a database, makereal queries, and process the results. There are more advanced techniques tolearn for special cases, but what we’ve covered here, accompanied by theJavadoc pages for java.sql.* classes, should be enough to create useful, realapplicati<strong>on</strong>s.And of course there is always that other good teacher, experience. So gotry some of what you now know.15.9RESOURCESIf you are going to use an Oracle database, we highly recommend Java OracleDatabase <str<strong>on</strong>g>Development</str<strong>on</strong>g> by David Gallardo (ISBN 0130462187, Prentice HallPTR), part of their Oracle Series. It includes several introductory chapters <strong>on</strong>database design, SQL, and even PL/SQL. It then has a much more thoroughcoverage of JDBC topics, with examples specific to Oracle, than we can coverin our limited space.A JDBC implementati<strong>on</strong> for MySQL is available athttp://www.mysql.com/downloads/api-jdbc.html.JDBC tutorial informati<strong>on</strong>, as well as lots of other JDBC informati<strong>on</strong>, isavailable from Sun at http://www.java.sun.com/products/jdbc/.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!