aspose file tools*
The moose likes Java in General and the fly likes  web interface to search database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark " web interface to search database" Watch " web interface to search database" New topic
Author

web interface to search database

Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
Currently I need to implement a web interface for search & enquiry of databases.
The senario is there is a page to provide search criterion, the criterion may comes from column A from Table 1, column B from table 2 (all thse tables can be joined). After speicified these criterion, the search result can display fields from various columns of various table.
Is there any framework does it?
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
If you are asking for DB querying frameworks you have plenty of them: ranging from simple JDBC frameworks, more complex ones iBatis, Hibernate and a full specification: JDO.

--
:alex |.::the_mindstorm::.


blog - InfoQ.com
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Your description might even match a reporting tool. Jasper Reports is one ... I know little more about it than the name, tho.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
You cross posted this in the servlets forum also. Which one do you want people to use to answer your question?


James Carman, President<br />Carman Consulting, Inc.
Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
Originally posted by James Carman:
You cross posted this in the servlets forum also. Which one do you want people to use to answer your question?


sorry about that, since I don't know where I should post to, it can be related to servlet, but after I post it, I think it should be a general question, not specific to servlet, so I post here.
Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
Originally posted by Ali Pope:
If you are asking for DB querying frameworks you have plenty of them: ranging from simple JDBC frameworks, more complex ones iBatis, Hibernate and a full specification: JDO.

--
:alex |.::the_mindstorm::.


I didn't use Hibernate or JDO, but I wonder can they achieve this: if a column is specified in the search criterion, then I should inner join the table the column resided in, if a column is displayed in search result, and not specified in any search criterion, then I should outer join this table.
Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
another complicated thing for my problem is our customer want to display the search result as following:
if table A has 0-many relationship with table B, and B has 0-many relationship to C, here is the requirement
__________________________________
A.value_1___B.value_1___C.value_1
______________________C.value_2
__________________________________
____________B.value_2___C.value_3
_______________________C.value_4
__________________________________
A.value_2___B.value_3___C.value_5
___________B.value_4___C.value_6
__________________________________
A.value_3___B.value_5
(sorry for this ugly layout, but i want to display it as a table, whole line of ____ means seperator of row in the HTML, and rest __ means spance

Means I need to do sth in the presentation layer to merge the repeated values at column level, instead of display the raw data from the resultset
[ March 17, 2005: Message edited by: Daoyue Ming ]
Gerome Kawa
Ranch Hand

Joined: Dec 05, 2002
Posts: 61
Try using Jasper. I have seen it briefly and I think it has the potential to to give you SQL-report like output
Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
I've been tinkering with JSP/Servlet lately-- that's in the front of my mind-- so I did it by using a servlet to create a list of plain Java beans (each of which contain other lists). So using the jstl <c:forEach>, and an html table, I'm able to put things in columns. And thanks to ${EL}, it's scriptless, quite readable, and tidy. But if you find some really easy way to do this using some pre-built thing, I'd be interested to know too.

--Dale--
Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
Originally posted by Gerome Kawa:
Try using Jasper. I have seen it briefly and I think it has the potential to to give you SQL-report like output


I am totally new for Jasper, what I need to do is build a framework so that my colleagues can build search and enquiry from my framework. So this framework must be flexible enough to allow dynamic columns and tables, can Jasper do it?
Daoyue Ming
Greenhorn

Joined: Oct 04, 2004
Posts: 26
Originally posted by Dale Seng:
I've been tinkering with JSP/Servlet lately-- that's in the front of my mind-- so I did it by using a servlet to create a list of plain Java beans (each of which contain other lists). So using the jstl <c:forEach>, and an html table, I'm able to put things in columns. And thanks to ${EL}, it's scriptless, quite readable, and tidy. But if you find some really easy way to do this using some pre-built thing, I'd be interested to know too.

--Dale--


referring the search result output? I can't visualize it
[ July 17, 2008: Message edited by: Daoyue Ming ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web interface to search database