Chapter 13. Database Access


13. Database Access

A database provides persistent storage for application data and is a critical part of many applications. Java has excellent support for accessing a relational database through the Java Database Connectivity (JDBC) API.

If your application has anything but a very simple data model with limited database access requirements, you might want to strongly consider using a database framework instead of writing directly to the JDBC API. The standard persistence framework for enterprise applications is the Enterprise Java Beans (EJB) framework. EJB is a part of the Java Enterprise Edition. EJB is considered to be overly complex by many Java developers, and thus open source alternatives are also becoming very popular. The complexity and problems with EJB fortunately have been partially addressed in EJB 3.0. EJB 3.0 is a big step in the right direction in terms of making EJB a more developer friendly technology. An excellent open source data persistence framework that is becoming very popular is the Hibernate framework. The Hibernate framework creates an object mapping layer of your relational data. The object mapping layer allows you to treat your persistent data in an object-oriented manner as opposed to through a procedural SQL interface. You can find more information about the Hibernate framework at: http://www.hibernate.org.

This chapter focuses purely on database access through JDBC. Even if you use a higher level persistence framework, it is important to have a good understanding of the JDBC API as this provides the foundation of most of the higher level frameworks.




JavaT Phrasebook. Essential Code and Commands
Java Phrasebook
ISBN: 0672329077
EAN: 2147483647
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net