Our website is made possible by displaying online advertisements to our visitors.Please consider supporting us by disabling your ad blocker.
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Translate it in your own Language

Print this Job Post

Print Friendly and PDF

Tuesday, May 27, 2014

JDBC Interview Questions

Question-165:What is JDBC?
Answer:
JDBC is a Java API that is used to connect and execute query to the database. JDBC API uses jdbc drivers to connects to the database.


Question-166: What is JDBC Driver?
Answer:
JDBC Driver is a software component that enables java application to interact with the database.There are 4 types of JDBC drivers:
JDBC-ODBC bridge driver
Native-API driver (partially java driver) Network Protocol driver (fully java driver) Thin driver (fully java driver).


Question-167: What are the steps to connect to database in java?
Answer:

  • Register the driver class
  • Creating connection
  • Creating statement
  • Executing queries
  • Closing connection.



Question-165: What is the difference between Statement and PreparedStatement interface?
Answer:
In case of Statement, query is complied each time whereas in case of PreparedStatement, query is complied only once. So performance of PreparedStatement is better than Statement.


Question-169: How can we execute stored procedures and functions?
Answer:
By using Callable statement interface, we can execute procedures and functions.


Question-170: How can we store and retrieve images from the database?
Answer:
By using PreparedStaement interface, we can store and retrieve images.


No comments:

Post a Comment

Copyright @ CrackMNC 2014-2024
Divas Nikhra Theme by Crack MNC