Share on Google+Share on Google+

what is the difference between resultset and rowset?
1 Answer(s)      4 years and 11 months ago
Posted in : Vurduk mu Şamarı Oynar Gotünün Damar

what is the difference between resultset and rowset? define the resultset? define the rowset? define resultsetmetadate? i want to dispaly tables of a database how do i do it? can you explain connection factory class? what is databasemetadata? define meta data? all java dirver?


View Answers

May 9, 2012 at 1:11 PM

Difference between ResutSet and Rowset:

1)The ResultSet does not contain all the data from your query. Since it has a connection to the database, when you run the next() method if the ResultSet needs more data it can go to the database and get it.While the RowSet can't do that since it isn't connected to the database so it must load and hold all the data from your query as soon as you run the execute() method.

2)ResultSet is connected and not serializable but RowSet is disconnected and serializable.

ResultSet: ResultSet is a java object that is used for database connectivity to hold the data returned by a select query. When we run a select query, it returns us the data with each row representing one logical group of data with a number of columns. JDBC ResultSet Example

RowSet: A RowSet object contains a set of rows from a result set or some other source of tabular data, like a file or spreadsheet. Because a RowSet object follows the JavaBeans model for properties and event notification, it is a JavaBeans component that can be combined with other components in an application. As is true with other Beans, application programmers will probably use a development tool to create a RowSet object and set its properties. JDBC RowSet Example

ResultSetMetaData: ResultSetMetaData is a class which provides information about a result set that is returned by an executeQuery() method. JDBC details interrogation can be done by using ResultSetMetaData. It includes the information about the names of the columns, number of columns, data type they contain etc. ResultSetMetaData Example

Java Display Tables of Database

ConnectionFactory Class:A ConnectionFactory object encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a connection with a JMS provider.

DatabaseMetadata:DatabaseMetaData provides comprehensive information about the database. This interface is implemented by the driver vendors to allow the user to obtain information about the tables of a relational database as a part of JDBC application. User can use this interface to deal with various underlying DBMSs.

Metadata: Metadata is data about data.It is the information that describes about structure and properties of our data. When we define a table we specify each columns name, type of data it holds and restrictions imposed (Constraints) and who owns it. This Information in JDBC Context is called MetaData.

JDBC Drivers

Related Tutorials/Questions & Answers:
Java Spring Hibernate Struts Training how to retrieve text and images from mysql database and show on html page using jsp servlet How to install Neo4j on Ubuntu 15.10? please help me in these prog MYSQL - mysql copy table to another table example by creating new table solution for mapping hibernate and pojos from net beans through database Connect GWT application with Oracle inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store This code have created jTable that connected with a database.every cell of last column have a button.But this button doesn't work properly.Where is the error java program Java Database Program jdbc Database connection class in a live project ..?? What is JDBC architecture? Unable to Create DSN for excel to ms access importing data and edit that data Database Scrolling Buttons how to use foreign key in java How to delete content of a log file from linux terminal? JSP-Oracle connectivity Student Management System Java code for Saving Marathi (Indian local language ) in Mysql and retrieving the same crud operations with foreign key constraint. I really need help with this assignment question Please help me out Please Backup Failed Mysqldump Got Errno 28 On Write Upgrade MySQL 5.1 to 5.5 in cpanel mysqldump all databases com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist persistence xml class element persistence.xml for MySQL MySQL JDBC Driver pom dependency code Blob column jdk6 and oracle 8i connexion oracle 8i et jdk6 java [ cannot retrive date from sql ] why?? Order Entry System How to threow timeout exception when DB is not responding How to threow timeout exception when DB is not responding This is the employee form to add data to mysql database but I got error of NullPointerException, Is this write code please give me feedback as soon as possible make a method which takes user name & pwd as parameter & validate them against the database. If the corresponding user exist return true otherwise false. prabhakar validating credentials and displaying error message in login .jsp if not valid JDBC jdbc jdbc code register servlet vibhu connectiondetails from vibhu


Advertisement null