File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQL in ORM world Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL in ORM world" Watch "SQL in ORM world" New topic

SQL in ORM world

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

In the world of ORM tools (Hibernate, TopLink) where most of SQL is generated, do you think developers spending more time with raw SQL?
ORM is a central part of Java EE and Java SE stacks (in the form of JPA).
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10032

Good post. Let's see how the experts react to this.

What I feel is that there are many apps today that still harness using SQL. Only the newer ones get ORM integrated. I hope I'm not wrong with this...

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Amit Wadhwaa
Ranch Hand

Joined: Feb 15, 2007
Posts: 74
True, but you still need to know how to use SQL for many purposes, Even hibernate has queries which are quite similar to SQL ones. Plus if you are working in a app which uses a db even through one of the ORM technologies, you would end up using a lot of SQL in your own development cycle(verifying results, creating tables ) though I would guess the role of SQL would certainly less important as compared to a JDBC app.

Waiting for comments on this

SCJP 5 94%<br /><a href="" target="_blank" rel="nofollow">My Blog</a>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

And not all experienced developers believe that relenquishing control to an ORM is always the correct choice.

[Asking smart questions] [About Bear] [Books by Bear]
Charles McGuire
Ranch Hand

Joined: Jan 18, 2005
Posts: 99
... and even if you believe that relinquishing control to an ORM is the way to go (which I don't), a good knowledge of SQL is still great for a quick query to answer a question, muscling data around a development environment, or to verify what your ORM is telling you.

There are functions that an SQL engine can do far more efficiently than application code, if you let it and are willing to give up some DBMS neutrality.

Don't mean to start a religious war, though...

There's no place like
I agree. Here's the link:
subject: SQL in ORM world
It's not a secret anymore!