This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLJ vs JDBC

 
robyne vaughn
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Java and want to do some database manipulation. What are the advantages of using either SQLJ or JDBC? I've been working with JDBC a little and wonder if there is some kind of buffer limit on bytes returned from the database using a prepared statement. I wonder if I should change my focus and consider SQLJ.
I'm trying to develop a web application. j2ee.
What do I consider when trying to make a choice?
thanks,
:roll:
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moving to the JDBC forum
 
Sujatha Ranganathan
Greenhorn
Posts: 12
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Robyne,
As far as I know, SQLJ is just one more level of abstraction. You write "embedded" SQL in your java code, which then gets translated into JDBC code. So the only difference (as far as I can tell) is ease of coding. I imagine some people would prefer to write embedded SQL rather than JDBC code directly.
Hope this has helped you.
Good Luck,
Avi.
 
Nitin Parashar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main difference between JDBC and SQLJ is that while JDBC provides access through dynamic SQL, SQLJ provides access through embedded static, SQL. Thus the traditional benefits of static SQL for Java language programs are all provided by SQLJ.
 
robyne vaughn
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much. You all offered good suggestions and information.
rob
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will chime in here in recommend using Hibernate.
This allows you to get away from SQL totally if you want to and concentrate on your application rather than debugging SQL statements. I have just started using it over the past few days and I am pretty impressed. Plus, they just released their Version 2. So it's hot off the press. Another bonus: Open Source and FREE.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic