What Is Hibernate?As stated on the Hibernate Web site, the goal of Hibernate "is to relieve the developer from 95 percent of common data persistence related programming tasks." By combining ordinary Java classes with XML descriptors, Hibernate provides an object-oriented view of a relational database. As shown in Figure 1.2, most Java applications access a relational database via JDBC (route 1, as indicated in the diagram). By using Hibernate, a developer is freed from writing custom JDBC integration code and can focus on writing the presentation and business logic of the application (route 2). This doesn't have to be an all-or-nothing proposition; you can use an existing JDBC application in conjunction with Hibernate, migrating access as you go along. Figure 1.2. Weblog & Post Java Objects[View full size image] Hibernate allows you to choose a development methodology that fits your needs. If you are starting a new project from scratch, you may wish to start with a mapping file, automatically generating both the schema and the Java classes (Chapter 2). Alternatively, you may wish to start from a relational database schema or directly from Java code (Chapters 3 and 4). Each system has pros and cons, as described in the chapter covering it. There are several conceptual components to Hibernate that will be described in detail in this book. Java classes and XML files are used by Hibernate to bind Java objects to a particular relational database schema (Chapter 5). Straightforward Java-based operations are then used to create, update, query, and delete records (Chapter 6). More complex relationships, including Java collections, class hierarchies, and database one-to-many, many-to-one, and many-to-many relationships can be managed by Hibernate in a very natural manner (Chapter 7). Rich queries can be expressed in terms of both a simple object-oriented query language and a "Criteria" system (Chapter 8). Hibernate has robust support for complex transactions (Chapter 9).
|
Wednesday, November 11, 2009
What Is Hibernate?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment