What are the different types of interfaces in the API component?


Posted On: Feb 22, 2018


The different interfaces are given below:

  • Connection:
  • getConnection() method is used to create this Connection object. DriverManager has a great number of connections.
  • Statement:
  • createStatement() method of connection class is used to create the Statement object. The Connection interface has a great number of Statement.
  • PreparedStatement:
  • prepareStatement() method of Connection classes used to create the PreparedStatement. This method is efficient in the performance of the parameterized query.
  • ResultSet:
  • Its object is to maintain and manage the cursor that points to a row of a table. ResultSet object is returned by the executeQuery() method of Statement interface.
  • ResultSetMetaData:
  • It contains a lot of important information which is about the data such as column type, column name, number of columns etc. ResultSetMetaData's object is returned by the getMetaData() of ResultSet.
  • DatabaseMetaData:
  • This interface is highly used to get metadata of a database. It provides information like database product version, driver name, database product name, the name of the total number of views, the name of the total no. of tables and much more. DatabaseMetaData's object is returned by the getMetaData() method of Connection interface.
  • CallableStatement:
  • It is used to call the reserved procedure and functions. Its performance is quite good because of the business logic on the database by using these reserved procedures and function. It can be done because these are precompiled. CallableStatement is returned by the prepareCall() method of Connection interface.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    JDBC Interview Questions

    What is the full form of JDBC and what is its purpose?

    JDBC stands for Java Database connectivity which is an application that helps in connection for the programming of Java language...

    JDBC Interview Questions

    What do you understand by JDBC driver and explain its types?

    JDBC drivers are software that enables the Java application to connect with the database..

    JDBC Interview Questions

    What are the different types of classes in the API component?

    The linkage between the user and driver is provided by the DriverManager...