Which two statements are true about RowSet subinterfaces?

Which two statements are true about RowSet subinterfaces?

Which two statements are true about RowSet subinterfaces?

A.
A jdbcRowSet object provides a JavaBean view of a result set.

B.
A cachedRowSet provides a connected view of the database.

C.
A FilteredRowSet object filter can be modified at any time.

D.
A webRowSet returns JSON-formatted data.

Explanation:
A:JdbcRowSet Mmakes results available as a JavaBean component
C: FilteredRowSetimplements lightweight querying, usingjavax.sql.rowset.Predicate The predicate set on a FilteredRowSet object applies a criterion on all rows in a RowSet object to manage a subset of rows in aRowSet object. This criterion governs the subset of rows that are visible and also defines which rows can be modified, deleted or inserted.
Therefore, the predicate set on a FilteredRowSet object must be considered as bi-directional and the set criterion as the gating mechanism for all views and updates to the FilteredRowSet object.
Any attempt to update the FilteredRowSet that violates the criterion will result in a SQLException object being thrown.
The FilteredRowSet range criterion can be modified by applying a new Predicate object to the FilteredRowSet instance at any time. This is possible if no additional references to the FilteredRowSet object are detected. A new filter has has an immediate effect on criterion enforcement within the FilteredRowSet object, and all subsequent views and updates will be subject to similar enforcement.

Note: The RowSet interface, a subinterface of ResultSet , was introduced with JDBC 2. Because a RowSet is a ResultSet , you can use any of the ResultSet processing methods previously discussed. But RowSet s tend to be more self-contained; you typically do not need to specify a driver, and performing queries is done in a new way. You call setCommand() to specify the query and execute() to perform the query (this takes the place of creating a Statement and calling its executeQuery() method).

Incorrect answer:
B: CachedRowSetcaches results in memory; disconnected Rowset.
D:WebRowSet converts between XML data and RowSet. The data is not JSON formatted.
Note: JSON or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for many languages.



Leave a Reply 0

Your email address will not be published. Required fields are marked *