Introduction To Hibernate

In this course you will learn the basics of the popular Java ORM Hibernate.
Course info
Rating
(549)
Level
Intermediate
Updated
Jul 30, 2013
Duration
3h 58m
Table of contents
Introductin To Hibernate
Basic Mapping
Mapping Relationships
Querying
Advanced Topics
Description
Course info
Rating
(549)
Level
Intermediate
Updated
Jul 30, 2013
Duration
3h 58m
Description

In the world of Java, one of the most popular and widely used frameworks is Hibernate. Hibernate is an ORM, or Object Relational Mapper, that allows developers to map Java objects to relational database tables. It is a valuable tool that all Java developers should know how to use. The problem is, learning Hibernate can be difficult. Hibernate is a very large framework and there are many important concepts to understand to use it effectively. This course is designed to make getting started with Hibernate as easy as possible and focus on the most important things you need to know. We start off this course by learning a bit about Hibernate and how it works, and then see how to get it setup with a real MySQL database installation. After that, we learn the very basics of mapping, which is one of the most important things to understand about Hibernate. I'll show you how to create a basic mapping for a Java object to a relational table and explain to you how the mapping works. But most real world applications have more complex mapping that often trips up new developers and experienced developers alike. So, we'll also cover some of the complex mapping situations like mapping collections and different relational mappings like one-to-many and many-to-one. Once you've learned how to map you objects, you'll want to know how to query them, so I'll show you how to do this using Hibernate's built in HQL and using a more object oriented approach with the Criteria API. Finally, we'll wrap things up by taking a brief tour of some of the more advanced features like caching and interceptors. So, if you are wanting to learn how to use Hibernate, or if you've been struggling through using Hibernate in an existing application, but never really understood what was going on, this course will give you the knowledge you need to feel confident about how Hibernate works and how to use it.

About the author
About the author

John Sonmez is the founder of Simple Programmer (http://simpleprogrammer.com), where he tirelessly pursues his vision of transforming complex issues into simple solutions

More from the author
Beginning Lua
Intermediate
2h 50m
2 Dec 2013
Beginning HTML 5 Game Development With Quintus
Intermediate
2h 52m
25 Oct 2013
Beginning HTML5 Apps For Firefox OS
Intermediate
2h 20m
17 Oct 2013
More courses by John Sonmez
Section Introduction Transcripts
Section Introduction Transcripts

Introductin To Hibernate
Hi this is John Sonmez from Pluralsight and welcome to this course on Hibernate. Hibernate is one of the most well-known object relational mappers or ORM's in the Java world and shaped much of the way other ORM's were built in both Java and other environments, but Hibernate can be a bit tricky to get started with. Unfortunately there isn't a quick way to just get going with Hibernate, because Hibernate although powerful is a fairly complex framework. This course aims at making it as easy as possible to understand enough of the basics of Hibernate to get started with it. In this course I'll take you through the process of getting Hibernate set up, which can be one of the most difficult parts of working with Hibernate, and I'll show you everything you need to know to be able to map your Java classes to SQL tables, and use Hibernates powerful query language to query your database. By the end of this course you should be able to set up Hibernate to work with a Java application and know how to use the basic features of Hibernate as well as some of the advanced ones.

Basic Mapping
Hi this is John Sonmez from Pluralsight, and in this module we'll be learning how to do some basic mapping in hibernate. So far we've been able to set up Hibernate, and our My SQL database. But we haven't been able to put any data into our database using Hibernate, because we haven't set up classes that are mapped to relational tables, which Hibernate knows about. In this module we'll learn about how mapping works in Hibernate, then we'll go through a simple example of mapping a Java class to a relational table in our My SQL instance. We'll also see how to load that data back from My SQL, and how we can even automatically generate tables from our mapping files.

Mapping Relationships
Hi this is John Sonmez from Pluralsight, in this module we'll be diving into the scary Hibernate world of mapping relationships. In any non trivial application you're going to have relationships between different pieces of data, after all if you don't have any relationships, why even use a relational database to begin with? Well in Java relations between pieces of data are pretty simple and fairly limited in the ways they can be expressed. Relational databases themselves allow for a much larger number of ways to express relational data. And when you combine this with Hibernate you get even more ways to express relations between data. Fortunately you only need to understand and use a few basic types of relations from most applications, so we don't have to all be experts in mapping relationships. In this module I'll take you through some of the most common types of relationship mappings you're likely to want to do with Hibernate, and show you a few of the less common ones as well.

Querying
Hi this is John Sonmez from Pluralsight and welcome to this module on querying and Hibernate. So far we've learned how to map data and to use those mappings to put data into our database using Hibernate. But what good is getting data into a database if we can't get it out? Just like we can use SQL to query a relational database directly, we can use Hibernate to query the database in terms of the java objects we've mapped. In this module, we'll go through the basic features of the Hibernate querying API's and learn how to create queries for getting back data from our my SQL database. Just like we could using SQL natively. We'll also learn how to use the eclipse Hibernate tools to enable us to test our queries in an editor to quickly get feedback and check results.

Advanced Topics
Hi this is John Sonmez from Pluralsight, and welcome to this last module in the Introduction to Hibernate course. In this module, we'll be taking a look at some advanced functionality of Hibernate. We'll be learning about Hibernate features we haven't covered so far like caching, batch processing, and using interceptors and filters. We won't be diving too deeply into these topic because this is still and introductory course but I do think it is important to have at least some knowledge of these topics even when you're first starting out so that you can know what kinds of features exist that can solve some pretty difficult problems you may face. You can always fill in any knowledge in this area later on once you know a little bit about it. At the end of this module I'll also be recommending an excellent book which contains more detailed information about Hibernate and expounds upon many of the topics we'll be covering in this chapter, in depth.