• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java & SQL or MySQL

 
Gihan Madushanka
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Java as a programming language. (But I am still a beginner). I want to know what DBMS that I should use with Java.
I have heard that MySQL goes with Java. Why is that ? is it because both are open sources & freely available ? Is it a must to use MySQL with Java?
I have learned SQL codings and it is easier for me to use SQL rather than MySQL. Is not it a good programming practice to use SQL with Java ? Is SQL used with Java in the industry ?
 
Stuie Clarky
Ranch Hand
Posts: 98
Eclipse IDE Java Ubuntu
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has a good deal of support and libraries that enable connection and working with SQL databases. This probably stems from history and that they are both pretty mature and fairly standard in industry. If you know SQL then using MySQL will not be a problem for you as SQL is a language, whereas MySQL is a database system that uses SQL, in a similar way to Oracle and Postgres. In my current job we use a Java framework that interacts with an Oracle database.

In terms of your skills and career, knowing both Java and SQL is only going to help improve your skill set.

Hope this helps


S
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15628
46
Android IntelliJ IDE Java Scala Spring
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gihan Madushanka wrote:I want to know what DBMS that I should use with Java. I have heard that MySQL goes with Java. Why is that ? is it because both are open sources & freely available ? Is it a must to use MySQL with Java?

Whatever DBMS you like. You can use MySQL, but it is certainly not a must to use MySQL, you can use many other database systems as well, for example Oracle, Microsoft SQL Server, IBM DB2, PostgreSQL, etc. There's no special reason why you should prefer MySQL.

Java has a standard API for accessing SQL databases, called JDBC. It works with a system of drivers: to be able to connect to a specific brand of database, you need a JDBC driver for that database. Most database vendors have a JDBC driver available for their database system.

See JDBC Database Access in Oracle's Java Tutorials for a good introduction on programming with JDBC.

Gihan Madushanka wrote:Is SQL used with Java in the industry ?

Absolutely. Almost all business software projects that I've worked on in my Java programming career have included a database that works with SQL. In my opinion, it's essential to have at least some knowledge of relational databases and SQL if you want to work on business software, because the use of relational databases and SQL is very common.
 
Campbell Ritchie
Sheriff
Posts: 51362
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our databases forum.
 
Gihan Madushanka
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks All !!!
Really appreciate your comments
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic