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:
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.
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.
SCJP 1.4, SCWCD 1.4, SCBCD 1.3
posted 16 years ago
Thanks so much. You all offered good suggestions and information. rob
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.
Trust God, but always tether your camel... to this tiny ad.