RowSet vs Hibernate, JDO, etc.

I

Ivan

I just read "JDBC RowSet Implementations Tutorial.pdf" and something I don't
understand.

RowSet can do this:
-connect to database
-make query i.e. fill it with data and disconnect from db
-can be transfered over "wire" because it implement serializable
-have cursor and can scroll through data
-can insert new data when is disconnected and latter can connect to db and
insert that new data in db automatically

If I read well, RowSet memorize which data was taken from db i.e. where was
data taken from db, and automatically make update if data change?
And if new data are added to disconnect RowSet with new connection to db
data are automatically inserted?
Did I miss something here???

Why then Hibernate, JDO, etc., when RowSet make things easier, I mean
everything is simplified, specially automatic insert and update?
And I think that's easy to work with RowSet and data-aware JSF and
Swing/AWT/SWT component?

I know Sun have RowSet implementation, do you know for other?
 
C

Chris Smith

Ivan said:
RowSet can do this:
-connect to database
-make query i.e. fill it with data and disconnect from db
-can be transfered over "wire" because it implement serializable
-have cursor and can scroll through data
-can insert new data when is disconnected and latter can connect to db and
insert that new data in db automatically
Yep.

Why then Hibernate, JDO, etc., when RowSet make things easier, I mean
everything is simplified, specially automatic insert and update?

The two do completely different things. RowSet lives at the database
level, and gives you more flexibility to interact with specific query
results. All the time, though, it works in rows and colums of a single
tabular data source. Hibernate and JDO allow you to work with objects
and their relationships, and can store those at a higher level, defining
mappings from your OO data model to the underlying relational data
source.

There are several types of applications people may write. You appear to
be working primarily with a database application, the essence of which
is to be a front-end over straight-forward data retrieval and storage.
Most of your code would then be GUI and simple data access code. In
those kinds of applications, it often makes sense to deal with the
database as a database, for example using JDBC (and RowSet is basically
an extension of JDBC).

For other applications, the core of the application is in processing
logic, and the use of a database is fairly incidental; in those cases,
it's best to have a more natural data model to work with than rows and
columns, and there are generally lots of interactions to manage between
relations of the database. It would be a real pain to use a tabular
model of your data, such as RowSet, in applications like this; so JDO
and Hibernate (and several other alternatives as well) help allow such a
developer to use an OO model of data for calculation, and then take care
of the database transparently.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
I

Ivan

For other applications, the core of the application is in processing
logic, and the use of a database is fairly incidental; in those cases,
it's best to have a more natural data model to work with than rows and
columns, and there are generally lots of interactions to manage between
relations of the database. It would be a real pain to use a tabular
model of your data, such as RowSet, in applications like this; so JDO
and Hibernate (and several other alternatives as well) help allow such a
developer to use an OO model of data for calculation, and then take care
of the database transparently.

Can you give me few examples of these apps for comparison between
JDO/Hibernate and RowSet applications?

I think that I can make all with RowSet, but maybe I mistake!
 
C

Chris Smith

Ivan said:
Can you give me few examples of these apps for comparison between
JDO/Hibernate and RowSet applications?

To give a really extreme example, let's say you're writing something
akin to MapQuest driving directions. Although this does access large
amounts of data in the form of the locations of various roads, the core
task is a computational one, and data is only secondary.
I think that I can make all with RowSet, but maybe I mistake!

No, of course you can do all database access with RowSet. You can also
write all possible programs in assembly language. You can also make do
without databases entirely and use flat files for everything. These
things are all possible. However, O/R mappers make some code easier to
write, easier to understand and maintain, and quicker to the market than
a lower-level interface like RowSet.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
J

Jan Jansen

Ivan said:
Can you give me few examples of these apps for comparison between
JDO/Hibernate and RowSet applications?

I think that I can make all with RowSet, but maybe I mistake!

Indeed, you are correct. Just the same you can also implement everything
in machine code, and even build your own CPU if you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top