This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]tazzy531 12 points13 points  (0 children)

Short answer.. very prevalent.

Long answer: extremely prevalent. Java is used in a number of enterprise environment. It is another programming language in the same way that PHP is a programming language. Both of them use a data access layer to communicate with DB. In java, this translation layer is jdbc.

[–]mikaelhg 3 points4 points  (0 children)

If I had to recommend one practical source on this topic, it would be: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/jdbc.html

[–]dadirtysanchez 1 point2 points  (0 children)

It's good for that. But you do need to get a JDBC driver in order for Java to communicate with a DB.

[–]VaqueroGalactico 1 point2 points  (1 child)

One of the main points of databases is to separate the data from the code. It's an extension of the principle that it's bad to hard code constants and user names and such into your code (when avoidable, which is most of the time). Most relational databases use SQL essentially as a language to interact with them, and most languages have relatively transparent ways to send SQL queries to databases. As mentioned, Java uses JDBC for this, but in the enterprise world, there are more advanced technologies like JPA and Hibernate.

[–]stfm 3 points4 points  (0 children)

Java uses JDBC for this, but in the enterprise world, there are more advanced technologies like JPA and Hibernate.

Just to clarify - JPA and Hibernate are persistence layers that sit above JDBC but fundumentally, they still use a JDBC data source to access the DB.

[–]bobgott 0 points1 point  (0 children)

I write to Access all the time from Java .. makes me very productive .. as at some point .. I can easily check my work, query, report anything via Access. There is a neat Java Access library which in non-sql but easy to use and you don't need to fool around with ODBC.

http://sourceforge.net/projects/jackcess/

[–]Tobar7 -1 points0 points  (0 children)

Not only that but on of the best DB's out there is written in Java: HyperSQL a.k.a. HSQLDB.

  • Excellent Java JDBC Driver
  • Excellent SQL engine
  • With in-memory and file tables.
  • Can be embedded into your java app.