Hello all,
I'm having a web reporting system developed using
J2EE. There are several reports and each of these reports have several columns(8 on an average). The column data can be sorted and filtered.
I have to write a logic to enable the saving of sort and filter for a particular user.
There are 2 flavors here, one is the permanent saving of data, where the data will be saved in the Database. The second one is the temporary saving of data, where the filter/sort data will be saved till the session exists.
Now every time the user makes any filter to any report, I need to save that data so that if the user browses through some other report and comes back, he should see the filtered report.
Now, there are again two options for me to save. The first one is saving the data to session and accessing it from the session variables.
The second one is database again where every time a filter is used, the values will be stored to the DB.
Storing data in the session seems to be a better option for me considering the frequent DB operations to store the temporary data.
My question here is that, is it advisable to store this data to session ? Whats the recommended suggestion for storing the temporary data ?
Thanks,
Aditya