CacheRowset, JDBCRowset and WebRowset

Explain CacheRowset, JDBCRowset and WebRowset.

A row set that caches the data in the memory after getting the details of a rowset from the database table. It is much faster and ideal for providing thin Java clients.

It is connected row set, that has fetched data from the database table. It serves as a thin wrapper around a ResultSet object for treating JDBC driver act as a JavaBeans component.

WebRowSet :
It is a connected row set that utilizes Hyper Text Transmission Protocol for interacting with Java servlet which provides the data access from a database. It is useful for thin web clients for retrieving and possibly updating the rows of a database table.

Explain CacheRowset, JDBCRowset and WebRowset.

JdbcRowSet is a connected type of rowset as it maintains a connection to the data source using a JDBC driver

CachedRowSet and WebRoeSet are disconnected types of rowsets as they are connected to the data source only when reading data from it or writing data to it.

Example 1:
JdbcRowSet j = new JdbcRowSetImpl();
j.setCommand("SELECT * FROM TABLE_NAME);

Example 2:
ResultSet rs = stmt.executeQuery("SELECT * FROM AUTHORS");
CachedRowSet crset = new CachedRowSetImpl();

Example 3:
WebRowSet wrs = new WebRowSetImpl();
wrs.updateString(1, "stringXXX");
Difference between static and non-static member of a class.
Difference between static and non-static member of a class - Yes, we can have.
This is also called as constructor overloading....
Describe the use of “instanceof” keyword.
Describe the use of “instanceof” keyword - “instanceof” keyword is used to check what is the type of object......
Disadvantage of garbage collector
What is the disadvantage of garbage collector? - Although garbage collector runs in its own thread, still it has impact on performance. It adds overheads....
Post your comment