• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Strategy  RSS feed

 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have a technical strategy question.

The background:
I have a table with loads of records (1000s)
They all need to remain in fairly active duty for review, etc

Question:
What is the best way to present huge data sets to the end user through JSP, while also not killing the database (i.e. looking up 1000s of records all of the time).

I guess I'm asking an even bigger question: what are the best, and common, strategies for managing large amounts of data through a web interface?

Any help is much appreciated.

All the best,

Steve
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Provide a paged view and/or allow your users to select filters to search for what they really want to see.

Your instinct is correct in that simply sending a large dataset to the browser is not a good thing to do either technically or from a user interface standpoint.
 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear,

Can you recommend and tag libraries for paging?

I've seen a few, but they all seem to accept the complete dataset and then handle the paging from that - which seems to defeat the point (i.e. reducing the demand on the database).

All the best,

Steve
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, most DBs will allow youto 'slice and dice' the result set so that you only need to fetch and return the records that you really want. PostgeSQL, for example, uses the LIMIT and OFFSET keywords to specify a result set 'slice'.

I am not familiar with any freeware tags that do this as I have created my own.

It's not really all that hard to do yourself though. You submit a request that specifies the 'page number' and number of records per page, and the run the query using limits computed from those values. I generally take the DB results and convert it to an Object[][] array to send to the page for display using nested <c:forEach> tags to construct the HTML table.
 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear,

That's a great start - I'll have a go.

All the best,

Steve
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!