Saving data from a SQL-query for later use

J

Jesper Sahner

Hi!

How would you save data from a SQL-query for later use?
Is RowSet an option?

I know this is a broad question, but I would like some opinions on the subject.

Regards,
Jesper
 
B

Bryce

Hi!

How would you save data from a SQL-query for later use?
Is RowSet an option?

I know this is a broad question, but I would like some opinions on the subject.

Well, depends on the requirements, but I generally have a java object
that maps to the columns of a particular rowset. If there are multiple
rows, then I have one object per row then save in a collection, such
as a Map or List...
 
G

Galen Boyer

Hi!

How would you save data from a SQL-query for later use?
Is RowSet an option?

I wouldn't until it is shown that the trips to the database are
too expensive.
 
M

marcus

Well -- for data integrity he might want to get all the data at once.
Some data might change between queries and he prefers to have an
integral set rather than latest of each piece.

It is possible to use the metadata concept to create a very flexible
object to store your data, and even to assist in generating queries --
and in my case building web forms to populate those queries. Links the
database structure to the webform so one change wass all that was
required for 3 -- count 'em boys -- three related tasks. damn I like
"--"'s
 
G

Galen Boyer

Well -- for data integrity he might want to get all the data at
once. Some data might change between queries and he prefers to
have an integral set rather than latest of each piece.

It is possible to use the metadata concept to create a very
flexible object to store your data, and even to assist in
generating queries -- and in my case building web forms to
populate those queries. Links the database structure to the
webform so one change wass all that was required for 3 -- count
'em boys -- three related tasks. damn I like "--"'s

But once you start saying, "Cache it" which is what the OP is
talking about" you have to solve the staleness issue. That ain't
no picnic. And, them entity beans, shudder...
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top