1.

Explain the types of RowSet available in JDBC.

Answer»

A RowSet is an OBJECT that encapsulates a set of rows from JDBC result sets or tabular data sources.
There are five types of RowSet interfaces available in JDBC. They are:

  • JDBCRowSet: It is a connected RowSet, which is having a live connection to the database, and all calls on this are percolated to the mapping call in the JDBC connection, result set, or statement. The Oracle implementation of JDBCRowSet is done by using oracle.jdbc.rowset.OracleJDBCRowSet .
  • CachedRowSet: It is a RowSet in which the rows are cached and RowSet is disconnected, which means it does not maintain an active database connection. The oracle.jdbc.rowset.OracleCachedRowSet class is used as the Oracle implementation of CachedRowSet.
  • WebRowSet: It is an extension to CachedRowSet and it represents a set of fetched rows of tabular data that can be passed between tiers and components so that no active data source connections need to be maintained.
    It PROVIDES support for the production and consumption of result sets and their synchronization with the data source, both in XML(Extensible Markup Language) format and in a disconnected fashion. This permits result sets to be transmitted across tiers and over Internet protocols. The Oracle implementation of WebRowSet is done by using oracle.jdbc.rowset.OracleWebRowSet .
  • FilteredRowSet: It’s an extension to WebRowSet and gives programmatic support to FILTER its content. This enables you to avoid the difficulty of query supply and processing involved. The Oracle implementation of FilteredRowSet is done by using oracle.jdbc.rowset.OracleFilteredRowSet .
  • JoinRowSet: It’s an extension to WebRowSet and consists of related data from various RowSets. There is no standard way to establish a SQL JOIN OPERATION between disconnected RowSets WITHOUT a data source connection. A JoinRowSet addresses this problem. The Oracle implementation of JoinRowSet is done by using oracle.jdbc.rowset.OracleJoinRowSet class.


Discussion

No Comment Found