Best Tutorial For Java & SQL?

bowlendev profile image Ryan Bowlen ・1 min read

What would you recommend to really learn SQL with Java? I want to be able to actually create and play with DBs on my machine.


Editor guide

Where does Java come into the picture? You can learn SQL on its own if you have a database and an application that lets you interact with it. If you're able+willing to have a service or daemon running try PostgreSQL, which includes an excellent command line interface psql. If you aren't, look into SQLite. There are a wide variety of graphical query and database management tools, most of which connect to more than one flavor of SQL DBMS.

I can't tell you much as far as tutorials go, except that @helenanders26 has a series here.


I am interviewing for a job where I will be writing java in connection with a SQL db. I just want to be sharper on those skills approaching the interview and possible job.

I am good with Java, but a bit overwhelmed in approaching the db.


I'd concentrate on learning basic database concepts and honing your SQL then. When you need to use Java to talk to one you'll be able to, but it's better to keep things simple when you're trying to pick it up.

I think that's where my understanding was breaking down. In previous projects with DBs, I used Python and SQLAlchemy. The whole ORM concept makes DBs easy, but it makes it tough to get the fundamentals. So in my mind, SQL wasn't a language of it's own.

Thanks for your help, I'm starting to get it!

When it's time to bring Java in, look at MyBatis. Object-relational mapping always winds up being more trouble than the initial convenience is worth.

Oh my seems like there is a problem with way people learn programming today: they jumped on framework without learning fundamentals and SQL is fundamental. Whatever programming languages you learn, if you don't know SQL, you risk to be discarded in many interviews right away.


I'm not super familiar with Java but as far as SQL goes:

For practice in the browser, these two are great:
PostgreSQL Exercises

Microsoft offers a tutorial and download of SQL Server Management Studio (SSMS) aimed at database administrators and developers who are familiar with database concepts and Transact-SQL
Tutorials for SQL Server Management Studio


Most obvious answer is Java / Oracle Database Tutorial since Oracle is the company who owns Java and that's the tech you'll probably work with if you target this as career.


Java's bigger than Oracle, and the omnipresent fear of license audits seems to be driving more and more people away from the mothership. It doesn't hurt that the entire suite of data access layer options from JDBC on up is designed to work with pluggable drivers for whatever RDBMS you want. I wouldn't count Oracle out, but it's not dominating the Java scene the way I assume Larry Ellison wishes it were.


His question was about finding a tutorial, not about what jdk to use ;)


For any who came to this post looking for similar answers:

Khan Academy's SQL tutorial is wonderful! It takes things slow, hands-on, and visual. I learned so much. Time will come where I understand how Java hooks into all this and I will update then.