Previous Lecture Lecture 30 Next Lecture

Lecture 30, Thu 02/27

Spring Boot Database Basics

We covered some basics of databases in Spring Boot including

Some detail

It’s helpful to have at least a little understanding of how SQL databases work.

If you are familiar with, and comfortable with the following concepts, that’s enough for what we are doing:

If you are unfamiliar with these concepts, I recommend looking over the following four pages from the w3schools website.

While the tutorial goes on at much more length, you will likely not need more than these pages of it for the work we are doing with SQL databases in this lab. You just need to know what we mean when we say table, row, field, and column.

In fact, arguably, these few pages, which should take no more than about 5-10 minutes to look over, have more information about SQL that you’ll likely need, since Spring Boot takes care of most of the low level details of SQL databases for us.

Setting up a Spring Boot app to use an SQL database

We are using Hibernate, JPA and JDBC as layers in between the SQL database and our application code.

There is so much to learn about these three technologies, and we’ll only be able to barely scratch the surface. In many cases, it won’t be clear, for any particular part of what we are doing, whether its Hibernate, JPA, or JDBC is that involved. That may make you wonder why I’m even mentioning the words.

The reason is that if/when something goes wrong, and you are debugging, it’s helpful to know what keywords to include in your web searches, and/or what keywords to look for in the results. Even if you don’t know exactly what Hibernate, JPA and JDBC are, at least knowing that you are using them is a good start.

Two different database technologies

For the actual database, we’ll be using two different technologies: