Search This Blog

Tuesday, July 28, 2009

Rethinking SQL Search in Web Applications (Part two)

Exploring the design

So, based on my previous post, a possible approach could be that instead of developer coding each search in the application by hand or like in some tools, an administrator configuring the search in an administration tool, the search gets defined as soon as a set of tables is scanned while connecting to a database schema. The administrator either manually defines a relationship between multiple tables using join keys and alternatively defines lookup columns and values for coded fields. These relationships could infact go across database tables. Alternatively, the system could scan the tables and come up with a list of suggested join keys and the end user simply confirms them. This meta-information that may span across multiple databases could be kept in a xml database for scalability, extensibility and portability.

In case of spatial data, it could be extended to the concept of spatial relationships such as for dealer locations in my previous example. Once these relationships are defined, the user could utilize them in the manner they want.

As mentioned, users can apply multiple search criteria on the same invocation of a search or can apply successive filters one after another. You can also use results of one search as a filter criteria on another search.

The user interface will also need some considerations. Instead of presenting the user a drop down of possible tables that could be added, user may be presented with an iPhone like UI, which user could potentially apply successively for firing a search.

No comments: