• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Usage of JDBC in the IT industry

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know how much JDBC is being used my companies, when everyone is moving towards Hibernate and Spring. Is there any advantage in using JDBC still or its over-taken by any other technologies, as i hear more people saying that JDBC is outdated..

Please enlighten me on this issue..

Sridhar Palla
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, Hibernate and other ORM frameworks are built on top of JDBC, so it continues to be important. I've also found that raw JDBC performs significantly better in situations where the objects generated by ORM frameworks aren't required, e.g. when importing large amounts of data into a DB.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We're still using jdbc a lot.
And the off-the-shelf products we buy (integration servers, erp software, content management platforms) too. Some directly, others with springs, hybernates or others.
But the larger half use jdbc directly.

Regards, Jan
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sridhar, for past 3 years I've been on several projects and still a significant percentage used pure JDBC for database layer. On the other hand, the world tends to use ORM instead of JDBC, but there remains a lot of systems based on the obsolete way of accessing database and you never know if don't get this project to bug fix or maintenance. Whatsmore, JDBC is not so hard to learn and we teach every single java developer at least basics of JDBC, because it is totally worth understanding JDBC exceptions and the way how JDBC works.

So the conclusion is, you don't need to be an expert on JDBC, but it is worth to know.
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's interesting, but most of my applications work fine going right to the data with JDBC. Performance is better as my SQL statements are finely structured to retrieve exactly what I want. There isn't a huge ORM layer in between that has to inflate data objects.

I also know that what I get out of the data base is real. It's current. Constraints and validations are defined to the DB, so I don't have to worry about something bypassing the ORM validations with a tool outside of the application. Data integrity is very high.

The HF book is about basic SQL, but I'd be interested in a book or well written article that talks about leveraging JDBC (and SQL) in applications instead of surrendering to application bloat via ORM and all the fragility that comes with it.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Charles McGuire:
but I'd be interested in a book or well written article that talks about leveraging JDBC (and SQL) in applications instead of surrendering to application bloat via ORM and all the fragility that comes with it.


As would I. At least it's nice to know that there's at least one other person who doesn't think that letting some bloated framework do all your thinking isn't a maverick approach.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Charles McGuire:
Performance is better as my SQL statements are finely structured to retrieve exactly what I want. There isn't a huge ORM layer in between that has to inflate data objects.


Assuming that you're talking about retrieving complete rows when only a subset is needed, then that's not what ORMs generally do (maybe some do). A query that specifies a subset will retrieve a subset, not more. And no row-wrapping objects will be created, either.

Constraints and validations are defined to the DB, so I don't have to worry about something bypassing the ORM validations with a tool outside of the application. Data integrity is very high.


Using an ORM doesn't change any of this. Some applications choose to manage constraints and validations in the DB; some choose to do it in the DB. I'm not sure how using an ORM -which is free to do or not do these things- makes a difference in this regard.

application bloat via ORM and all the fragility that comes with it.

Can you explain what you mean by fragility? What kinds of scenarios do you have to guard against when using an ORM that you didn't without one?
 
reply
    Bookmark Topic Watch Topic
  • New Topic