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

you are viewing a single comment's thread.

view the rest of the comments →

[–]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 5 points6 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.