Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1 - How to display data from different databases on one click?

 
Teresa Lee
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a search engine and on the result page, if something is found (an employee is found by the given ssn), I need to display all other critical information about this employee and all these infomation is stored in different oracle databases(like 20 tables involved). As we all know, database accesses are very expensive and my users need the critical info to be displayed fast (real rast). My first question is: Is there a way to get these info fast (I was confirmed that we cannot put the info into one table or one database)? My second question is: How to display them so the user can view all the info together like in one page? I have suggested that using tabs on the page and one tab for one set of info from one database so when the user click tab A, the link leads to Action A and then when user click tab B, goes to Action B and they just want to view all info in one click maximum and real quick. Please give me some ideas. Thanks.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Teresa,

You can get the info you want from several tables using a database view or a more complex SQL statement joining the tables you want together. This really doesn't have a lot to do with struts.

As for the tabs option, I believe this is a great option, but I suggest that you get all the data one time, and separate them in the different tabs, so that you won'd make a lot of hits on the database.
 
Teresa Lee
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Alaa for the reply. Besides using tab, if you have any other data representation solutions, please share with me. Your help is greatly appreciated.

Kira
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Again Teresa,

If the search returns more than one result, you can represent them in a table (I prefer using displaytag) where each row has the most important data needed, and each row has a link to a page that displays the full data you want (may be separated into tabs of course).
 
Teresa Lee
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alaa,

Thank you very much for sharing this with me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic