1.

Explain Basic Steps In Writing A Java Program Using Jdbc?

Answer»

JDBC makes the interaction with RDBMS simple and intuitive. When a Java application NEEDS to access DATABASE :

  • LOAD the RDBMS specific JDBC driver because this driver actually communicates with the database (INCASE of JDBC 4.0 this is automatically loaded).
  • Open the connection to database which is then used to send SQL statements and get results back.
  • Create JDBC Statement object. This object contains SQL query.
  • Execute statement which RETURNS resultset(s). ResultSet contains the tuples of database table as a result of SQL query.
  • Process the result set.
  • Close the connection.

JDBC makes the interaction with RDBMS simple and intuitive. When a Java application needs to access database :



Discussion

No Comment Found