Discover how to use Hibernate ORM, an object-relational mapping framework for the Java language, to map an object-oriented domain model to a relational database.
- [Peggy] Welcome to Java Hibernate. I'm Peggy fisher, your instructor for this course. This course introduces you to the Hibernate ORM framework. The framework is designed to facilitate programming in Java that requires access to a relational database management system. By using an RDBMS, we can provide persistent data. In other words, it allows us to store data for future access. When programming in Java, we create classes as a blueprint to represent real life entities.
Then we use the class to instantiate, or create, objects. To make these objects persistent, we need to map them to the database tables in the RDBMS so that the data can be stored and retrieved at a later date and time. The programmer must also worry about table relationships, and making sure to enforce data integrity rules. Once Hibernate is setup to handle the database connection, as well as the data mapping from objects to tables, the programmer can take it from there.
- Installing Hibernate
- Adding a database connection for a project in NetBeans
- Setting up the configuration file
- Reverse engineering to discover object details
- Mapping the database to Java objects
- Saving, updating, and deleting an object
- Retrieving objects
- Using the CriteriaQuery
- Using HQL and native SQL queries
- Using aggregate methods in HQL