Hibernate Basics
Treehouse
Course Summary
Most meaningful applications you will write will have a database associated with it. Knowing how to connect with and incorporate this data is critical to success as a Java developer. In this course, we'll cover how to connect a Java application to a database using what's called JDBC, or Java Database Connectivity. Then, we'll use the convenient approach of including an ORM, or Object Relational Mapper. This will allow us to interact with our data using object-oriented techniques instead of exclusively relying on hard-coded SQL. The ORM we will use is called Hibernate, and is one of the most popular ORMs available.
-
+
Course Description
About this Course Most meaningful applications you will write will have a database associated with it. Knowing how to connect with and incorporate this data is critical to success as a Java developer. In this course, we'll cover how to connect a Java application to a database using what's called JDBC, or Java Database Connectivity. Then, we'll use the convenient approach of including an ORM, or Object Relational Mapper. This will allow us to interact with our data using object-oriented techniques instead of exclusively relying on hard-coded SQL. The ORM we will use is called Hibernate, and is one of the most popular ORMs available. What you'll learn
- Database
- CRUD
- JDBC
- ORM
- Hibernate
About the Teacher
On the side I run a nonprofit organization that takes teenagers to developing countries to volunteer during the summer. I enjoy running and yoga, especially outdoors in the beautiful Chicago summer weather.
-
+
Course Syllabus
Data Persistence & ORMs
During this stage, we'll start by practicing the basic SQL CRUD operations in a SQL Playground. Then, we'll use workspaces to connect a Java application to a SQLite database using JDBC, or Java Database Connectivity. Finally, in an attempt to map Java objects to database tables, we'll build a case for incorporating the all-inclusive solution of an Object Relational Mapper such as Hibernate. 9 steps- Course Introduction 1:52
- Introduction to Data Persistence 3:18
- Review of DB Concepts 3 questions
- Review of SQL 7:19
- SQL Review 5 questions
- Using Java to Connect to a Database 13:55
- Using JDBC to Connect to a Database 2 objectives
- Save a Java Object to a Database 6:27
- The Case for Object-Relational Mapping 2:43
Getting Started with Hibernate
After stretching our database and SQL muscles, we're now ready to incorporate an Object Relational Mapper, or ORM. In this stage, we'll configure our Java application to work with Hibernate. To instruct Hibernate as to how we wish to map our POJOs/entities to database tables and columns, we'll employ JPA annotations. 10 stepsPersisting Data with Hibernate
Now that we have our application configured to use Hibernate, it's time to see how all the CRUD operations are performed using Hibernate. During this stage, we'll see how to write the code for actually creating, reading, updating and deleting entity objects with the Hibernate SessionFactory. 8 steps