YoVDO

Hibernate Basics Course (How To)

Offered By: Treehouse

Tags

Hibernate Courses Java Courses SQL Courses JDBC Courses CRUD Operations Courses Object-Relational Mapping (ORM) Courses Data Persistence Courses

Course Description

Overview

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

  • Using a database with Java
  • Performing CRUD operations
  • Connecting with JDBC
  • Object-Relational Mapping (ORM)
  • Wrapping a database with Hibernate

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.

Chevron 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.

Chevron 10 steps
  • Intro to Hibernate

    2:17

  • Hibernate Sessions

    2 questions

  • Configuring a Project to Use Hibernate

    6:34

  • Create a Hibernate Configuration File

    2 objectives

  • Adding a POJO with JPA Annotations

    9:34

  • Adding JPA Annotations to an Entity

    2 objectives

  • Building a Hibernate SessionFactory

    4:41

  • The Builder Design Pattern

    8:46

  • The Builder Design Pattern

    1 question

  • Using the Builder Pattern

    1 objective

Persisting 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.

Chevron 8 steps
  • Saving Data with Hibernate

    6:23

  • Persisting an Entity with Hibernate

    1 question

  • Saving an Entity with Hibernate

    1 objective

  • Fetching Data with Hibernate

    9:27

  • Fetching an Entity List with Hibernate

    1 question

  • Retrieving Data with Hibernate

    2 objectives

  • Updating and Deleting Entities

    9:53

  • Wrap-Up

    1:07


Related Courses

Adv. Java: Enterprise Edition
City College of San Francisco via California Community Colleges System
Learn Spring: Building an App
Codecademy
Advanced Java
LearnKartS via Coursera
Database Management with Java and SQL
Amazon via Coursera
Comprehensive Java Course Certification Training
Edureka