Monday, 3 September 2012

Java Training: - Explain “ResultSet”, “RowSet”, “CachedRowset”, “JdbcRowset” and “WebRowSet” relation ship?

Below are the major points of difference:-
  • “ResultSet” is a connected architecture while “RowSet” is a disconnected architecture.
  • As “ResultSet” is a connected architecture we cannot serialize the object while “RowSet” can be serialized.
  • “RowSet” object is a Java bean while “ResultSet” is not. In the below diagram you can see “RowSet” interface also derives from “BaseRowSet” interface. “BaseRowSet” interface has all the ingredients to make it a Java bean.
Below diagram shows the complete relationship between all the interface and classes.


Figure: - Interface diagram for “Resultset” and “RowSet”
As "RowSet" is a disconnected from database it need to maintain Meta data for columns. "RowSet" can also provide scrollable resultsets or updatable resultsets even if the JDBC driver is not supporting the same. Java client can get a “RowSet” manipulate the same and finally send all the results to the database at one go. Sun has provided three implementation of “RowSet” as below:-

CachedRowSet: - Disconnected rowset always keeps the data in memory. It is scrollable and can also be serialized. It’s an ideal choice where we want to pass data between tiers or to do batch updates. "CachedRowSet" are disconnected so can be used for huge number of updates. Get the "CachedRowSet" object manipulate all your data and send the whole bunch of manipulated data in on go to the Database.

JDBCRowSet: - It’s opposite to "CachedRowSet". It maintains a connection to the database while the client has reference to it. So it’s a connected architecture as compared to CachedRowSet.

WebRowSet :- "WebRowSet" is a extension of "CachedRowSet". But the added feature is it can produce XML presentation of the data cached. If you are thinking of exposing your data through web services or to provide data to thin client which are written in different language other than JAVA. Best bet if you want to pass data in XML format over HTTP protocol.

See the following video on FlyWeight Pattern in Java: -



Click to get Java Training

Regards,

Get more Java Training from author’s blog

12 comments:

  1. keep up the good work. this is an Ossam post. This is to helpful, i have read here all post. i am impressed. thank you. this is our site please visit to know more information
    data science training in courses

    ReplyDelete
  2. I surely acquiring more difficulties from each surprisingly more little bit of it
    data scientist training and placement

    ReplyDelete
  3. Learn job-specific skills relevant to the job market using Python by registering for the rigorous Python Course in Hyderabad by professional trainers in real-time in AI Patasala.
    Online Python Course in Hyderabad

    ReplyDelete
  4. What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.
    data science training

    ReplyDelete
  5. This blog post does a great job explaining the difference between ResultSet and RowSet in Java, especially for those preparing for interviews. The detailed comparison of how RowSet extends ResultSet and supports operations like data scrolling and updates is very informative. Understanding these Java concepts is essential for developers, just as mastering digital marketing is crucial for business growth. If you’re looking to upskill in other fields like digital marketing, check out this Digital Marketing Course In Delhi, which covers the latest strategies to enhance your online presence.

    ReplyDelete
  6. keep up the good work. this is an Ossam post. This is to helpful, i have read here all post. i am impressed. thank you. this is our site please visit to know more information
    digital marketing courses in delhi

    ReplyDelete
  7. Thanks for the post,Really you given a valuable information.worth to read this type of articles .
    Medical Coding Courses in Bangalore

    ReplyDelete
  8. This explanation on the relationship between ResultSet, RowSet, CachedRowSet, JdbcRowSet, and WebRowSet is comprehensive and highlights the key architectural differences clearly. The breakdown of connected versus disconnected architectures is especially helpful in understanding how these interfaces and classes interact in Java.

    The distinction between CachedRowSet for batch updates, JdbcRowSet for connected architectures, and WebRowSet for XML data transfer is well-articulated. The added ability of WebRowSet to expose data via web services makes it highly relevant for modern applications requiring cross-platform compatibility.

    Interestingly, for professionals working with large datasets in Java, exploring data Science courses in Delhi can be a valuable next step. Data Science knowledge can complement Java expertise by offering advanced data processing, machine learning integration, and analytical skills—perfect for building data-driven applications.

    Thanks for sharing this insightful content on Java training—looking forward to more technical deep dives like this!

    ReplyDelete
  9. This explanation of the relationships between ResultSet, RowSet, CachedRowSet, JdbcRowSet, and WebRowSet is both clear and insightful. The comparison between connected (ResultSet) and disconnected (RowSet) architectures, along with details on serialization and JavaBean compatibility, is particularly useful for understanding how these components work together in Java database connectivity. The breakdown of the different RowSet implementations—especially the WebRowSet for XML data transfer—is a great addition for developers working on web-based applications.

    For those looking to enhance their programming knowledge with complementary skills, data Science courses in Delhi can be an excellent option. Combining Java proficiency with data science can open up opportunities in data-driven application development, machine learning integration, and big data solutions.

    Thanks for sharing such an informative resource—this will definitely help Java learners and professionals looking to upgrade their skills in both programming and data science!

    ReplyDelete