Java Database Connectivity (JDBC): Lesson
Lesson 1 of 1
  1. 1
    The Java Database Connectivity (JDBC) framework is an API provided by Oracle, the parent company of the Java programming language, and is included in the JDK when you install it on your compute…
  2. 2
    The first layer we will set to tackle is the bottom-most, the JDBC Drivers. These are third-party files that allow a specific database to extend JDBC classes and interfaces so that they work with t…
  3. 3
    In order to keep our project organized, we are going to spend some time refactoring it. As we start expanding the scope of our program to bring in outside resources and communicate across a variety…
  4. 4
    Now that we have verified that our drivers are present and restructured our project into a common design protocol, it is time to make the connection to our database. The default setup of a SQLite …
  5. 5
    Now that we have connected to the database, it is time to begin communicating with it. JDBC provides a very straightforward class to take care of executing static SQL queries, the Statement interf…
  6. 6
    Up to this point, we have still been operating strictly in the Java language within our application. Now that we have firmly established a connection with our database and successfully created a st…
  7. 7
    - Database Created… ✅ - Table Created… ✅ - ~~Alderaan System targeted~~… ✅ - List of Customers Saved to Table… ❌ As you can see our ~~death star~~, database, is not quite fully operational…
  8. 8
    Everything we’ve done so far has revolved around pushing data to our database, an important skill, but only half of the story. Let’s take a look at a very common data persistence scenario, loading…
  9. 9
    A ResultSet is all good and dandy, but what we really need back into our program is Customer objects! In the previous exercise, we used the .getString() method to pull data from a column and conver…
  10. 10
    Congratulations! You now know how to successfully implement the Java Database Connectivity framework. This API provides you with a deep dive into the connection between the front and back ends of s…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo