Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Welcome R.M. Menon!

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This week we have a special guest in the JDBC forum: R. M. Menon, the author of the new book Expert Oracle JDBC Programming. He'll be here until Friday answering questions about the book and about programming for Oracle with JDBC. We'll also be giving away four copies of the book to four luck posters. See for contest rules.


Go ahead, c'mon in, start a new thread, and ask him a question; but be sure to wipe the mud off'n yer boots, first.
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks
This is R. M. Menon, the author mentioned in the above post. Please feel free to ask your questions about the book. Typically, I will answer them at the end of the day.

Thank you!

Menon
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*cough*

http://www.javaranch.com/name.jsp


"separate [rules] are inherently unequal." - Supreme Court of the United States - Brown v. Board of Education
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your book is specifically about JDBC for Oracle databases, I see. Since Oracle is the DB I regularly deal with professionally, I would like to ask you if you discuss in detail the preferred drivers to be used with the different Oracle versions. There is soon to be an upgrade to 10i where I work, and I am curious as to any changes in this regard.

Also, If I may be so bold, I would like to ask you a question about Statements. I've noted that some well respected programmers advocate closing all Statements explicitely, in addition to explicitely closing the Connection.

In my own experience with working on Oracle DBs, when submitting many different queries (executing many Statements), closing the Statements explicitely after each and everyone sometimes breaks the application; whereas not doing so for all intents and purposes gives every indication of working smoothly. Closing the Connection explicitely is not an issue.

May I have your own opinion on this?
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your book is specifically about JDBC for Oracle databases, I see. Since Oracle is the DB I regularly deal with professionally, I would like to ask you if you discuss in detail the preferred drivers to be used with the different Oracle versions. There is soon to be an upgrade to 10i where I work, and I am curious as to any changes in this regard.



Yes this topic is dealt with specifically. Going forward in most cases (in 10G (not 10i), you should be using the thin driver.


Also, If I may be so bold, I would like to ask you a question about Statements. I've noted that some well respected programmers advocate closing all Statements explicitely, in addition to explicitely closing the Connection.

In my own experience with working on Oracle DBs, when submitting many different queries (executing many Statements), closing the Statements explicitely after each and everyone sometimes breaks the application; whereas not doing so for all intents and purposes gives every indication of working smoothly. Closing the Connection explicitely is not an issue
May I have your own opinion on this?


I am not sure what "problems" you refer to when closing statmenets explicitly. Yes, if you prepare a PreparedStatement and close it in a loop, you would run into performance issues - this topic is covered in detail in the book. You can use statement caching to resolve this issue "transparently" in JDBC 3.0. (There is a chapter for statement caching in the book.)

Btw, almost all cases you should be using PreparedStatement or CallableStatement for an DMLs..

Also, you can get a flavor of the book by looking at the sample chapters at OTN (you do have to register - but it is worth it as this is the place where all Oracle documentation is freely available):
http://www-portal-stage.oracle.com/wocportal/page/wocprod/OCOM/technology/books/files/menon_ch.zip


Hope this helps...
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Maximilian Stocker:
*cough*


First initials are not encouraged, but are allowed.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. Your book sounds like a worthwhile read. The reason I am not using PreparedStatements for 'the' particular application I refer to is because it is basically an SQL-Plus kind of application that allows free form on the fly SQL query entry and is not part of a production run 'series' of SQLs statements. Otherwise, in other applications I do use PreparedStatements often.

~Bill
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. Your book sounds like a worthwhile read. The reason I am not using PreparedStatements for 'the' particular application I refer to is because it is basically an SQL-Plus kind of application that allows free form on the fly SQL query entry and is not part of a production run 'series' of SQLs statements. Otherwise, in other applications I do use PreparedStatements often.

~Bill



Even here you may wanna use prepared statements for security reasons (think SQL Injection). It also depends on if the same query is submitted with different bind variable values or not. Personally, I don't see any reason for using Statement when working with DMLs (unless you specifically dont want to bind variables for very well understood reasons.)
I cover this topic in the sample chapters at Otn link to which I posted earlier (see chapter 5 in the two chapters.)
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my case, as I said the SQL is totally free-form. One SQL is:

select tableA.field_b
from tableA
where tableA.field_a in ('01', '02', '03')
and trunc(tableA.activity_date) = trunc(sysdate-1);

... And the next SQL is:

select max(to_char(tableZ.doc_number,'99999990')),
tableZ.doc_name
from tableZ
where tableZ_year = '2006'
and tableZ_doc_type = 'B'
group by tableZ.doc_name
order by tableZ.doc_name;

... and so on. Just as one would in SQL-Plus.
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, SQL PLus allows you to use bind variables too If I may ask why this application was built in the first place?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey kids --

To ask a question, please start your own thread; questions in this thread don't count as entries in the book giveaway!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome Menon! I hope you have a good week here.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hey kids --

To ask a question, please start your own thread; questions in this thread don't count as entries in the book giveaway!"

It started out as a question about the book - about what he has in the book about closing statements ... at least in my mind that was a question about the book. I assure you that I did not mean to digress ... it just happened. I did not think that it was proper to ignore his questions. But, okay I stopped ... unless he asks more. Best regards,

~Bill
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"To ask a question, please start your own thread; questions in this thread don't count as entries in the book giveaway!"

Well, how would I know that a thread is meant for me - I thought I have to watch just this "thread"

And Thanx Jeanne - I should havea good time here..

Menon
 
angelo celeste
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi R. M.
The link that you supplied above does not work for me.
http://www-portal-stage.oracle.com/wocportal/page/wocprod/OCOM/technology/books/files/menon_ch.zip
I have logged onto OTN and cannot locate this anywhere. I have tried directly and through Oracle. Also did a search for your name....no luck.

Any suggestions?

Thanks.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The link does not work for me either. And just to answer your last question and then leave it for now ... the reason I coded up the application was simply to have an app tailer fitted to my needs w/o frills I do not want and with add-ons that I do. Thanks for your replies.

I want to ask you additional questions about your book after reviewing it, if I may. Best regards,

~Bill
 
R. M. Menon
Author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx guys.

The link is not working for me either now - some issue with otn, I guess.

You can get the same chapters from the bookpool site:

http://www.bookpool.com/sm/159059407X

Hope this helps...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest,
A book promotion, that's cool.

What happened to the last one ? (Ajax Patterns)
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading it ... so far, very interesting. No more questions yet though. ;o)
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you:

... instead of:

?
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to our fine forum. We'll do our best to make you feel cozy and comfortable here. This is great, becuase I actually have a question or two about the Oracle JDBC driver -- but you'll find my questions in their own thread.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, I ask in ignorance ... now I am confused. The opening post reads: "... He'll be here until Friday answering questions about the book and about programming for Oracle with JDBC ... ".

Yet you just said: "I actually have a question or two about the Oracle JDBC driver -- but you'll find my questions in their own thread."

Isn't that splitting hairs? Please explain ... I don't to make any more faux pas ;o)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"He'll be here" means that he'll be at the JDBC forum.
If everybody sends questions in a single thread, this will be a complete mess, won't it ?
So please start a new thread when you have a question.
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stupid me - id took no note of this on the first post:
"Go ahead, c'mon in, start a new thread, and ask him a question; but be sure to wipe the mud off'n yer boots, first."

Forgive me please, I am new here and this moderated forum is not at all unpleasant, just different from what I am used to.

Thanks for your kind reply; best regards,

~Bill
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
's OK, Bill. No worries!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic