DEV Community

Ryan Bowlen
Ryan Bowlen

Posted on

Best Tutorial For Java & SQL?

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.

Top comments (12)

Collapse
 
dmfay profile image
Dian Fay

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.

Collapse
 
bowlendev profile image
Ryan Bowlen

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.

Collapse
 
dmfay profile image
Dian Fay

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.

Thread Thread
 
bowlendev profile image
Ryan Bowlen

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!

Thread Thread
 
dmfay profile image
Dian Fay

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.

Thread Thread
 
lepinekong profile image
lepinekong

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.

Collapse
 
helenanders26 profile image
Helen Anderson

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

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

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

Collapse
 
lepinekong profile image
lepinekong

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.

Collapse
 
dmfay profile image
Dian Fay

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.

Collapse
 
lepinekong profile image
lepinekong

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

Collapse
 
bowlendev profile image
Ryan Bowlen

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.

Collapse
 
jamessmith23 profile image
JamesSmith23

Here's some SQL tutorials and Java tutorials!