Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / December 2004

Tip: Looking for answers? Try searching our database.

RowSet vs Hibernate, JDO, etc.

Thread view: 
Ivan - 26 Dec 2004 10:50 GMT
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?
Chris Smith - 26 Dec 2004 16:10 GMT
> RowSet can do this:
> -connect to database
[quoted text clipped - 3 lines]
> -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.

Signature

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Ivan - 27 Dec 2004 08:10 GMT
> For other applications, the core of the application is in processing
> logic, and the use of a database is fairly incidental; in those cases,
[quoted text clipped - 5 lines]
> 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!
Chris Smith - 27 Dec 2004 17:19 GMT
> 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.

Signature

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Jan Jansen - 28 Dec 2004 12:17 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.