Java Beans Question and Answers

13. What is a Prepared Statement?
 
  • A Prepared statement is a pre-compiled statement prepared once by the client and sent to the server, and expected to be executed many number of times.
  • This is especially useful if the same type of query needs to be executed more number of times.
  • This Prepared statement is sent to the server, where it will be parsed to understand what is to be done.
  • When a client fills the blanks in the prepared statement by appropriate values and asks for the execution, the statement is executed and the results are sent back.
 
Your Name Your Email-ID
Your Answer
14. What is ODBC?
 
  • ODBC or Open Database Connectivity is a way to connect any front-end tool to any back –end database engine.
  • A front-end tool is one which is used to provide a user interface using which the user will be able to manipulate the data.
  • A back –end is responsible for the actual manipulation of the data based on the requests of the front-end, as well as for the storage and retrieval of the information.
 
Your Name Your Email-ID
Your Answer
15. Explain ODBC its Architecture?
  ODBC architecture constitutes six major components namely
  • Front-end Tool : This provides an interface to access the database residing on back-end server, and also to present the information to the user in the format specified.
  • Back –end DataBase engine : this is responsible for storing, retrieving, and maintenance of data.
  • Database : Database is a set of data items that are logically related. A database is just a storage scheme of data, which can be manipulated only through the corresponding database engine.
  • ODBC Driver : Every database engine will have only one ODBC Driver. This is usually supplied by the database vendor.
  • ODBC Data Source : ODBC Data Source provides the way for a front-end to connect to a data source.
  • ODBC Manager : To manage ODBC Drivers and ODBC Data Sources, a program is supplied along with the database or sometimes with the OS which is called ODBC Manager. This can be used to install new ODBC Drivers or create new Data Sources.
 
Your Name Your Email-ID
Your Answer
16. Why JDBC is needed once we have ODBC in hand?
 
  • JDBC can connect only Java clients and it uses ODBC for the connectivity. Since ODBC gives a C language API that uses pointers extensively, ODBC alone cannot serve the purpose to connect to Java clients.
  • As Java does not have pointers and is object oriented, Sun Micro Systems, inventor of Java, developed JDBC to suit its needs.
 
Your Name Your Email-ID
Your Answer
1234 Page 4 of 4