Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Chapter 15. Hibernate

Hibernate is an open-source, JDBC-based object/relational persistence and query service. Hibernate is used to map data representation in a Java object to a database. Hibernate supports several databases including DB2, MySQL, Oracle, and PostgreSQL. With Hibernate, Java data types are mapped to SQL data types. Hibernate generates the required SQL to create, update, and delete database tables. Hibernate is used for generating tables from a Java Bean class and adding, retrieving, updating and deleting data to the tables.

Hibernate is preferred over other database persistence technologies, such as Castor, TopLink, and Entity EJB, because of lesser complexity, greater flexibility, open‑source architecture, and support for different databases without the requirement to provide vendor-specific SQL code in the data access layer. Hibernate also provides classes for Ant build tasks, which may be integrated into an Ant build file. In this chapter, we will integrate Hibernate with...