I'm creating a property website. I've got a table for qualities (i.e. "houses"), a table for pictures, a table for features, etc. So each property's data originates from three, not just one table.

I have to give a function that retrieves asked for property data based on searching criteria, for instance:

  1. property each week
  2. featured qualities
  3. qualities available
  4. the easy search

I've multiple drop-lower lists for choosing country, region, area, sleeping rooms, cost range, type, etc.

I already built many functions each dealing and among the above mentioned cases, but I'm wondering, if there is every other method of building one flexible mechanism which will retrieves anything you want inside a wise way, I am talking about one function that actually works for those cases?

I understand my real question is type of vague and too broad, but bear beside me please.

Thanks ahead of time.

PS: I'm using ASP.Internet 3.5, VB.Internet, Visual Webmaster 2008 Express, SQL Server 2005 Express

I believe you are searching to construct a professional Search functionality that combines using the default/simple search provided.

Why don't you develop a single saved procedure to encapsulate all possible kinds of searches by indicating default values of parameters that aren't passed.

In this way, the easy search could be using all parameter defaults. Whenever any criteria is supplied to narrow the search, the passed parameter value will be utilised by the Saved Procedure.

Is Lucene a choice? Lucene.internet is a terrific way to give a fast and flexible internet search engine for your site. If you use Lucene additionally you a number of other advantages, like fuzzy search etc...

http://www.codeproject.com/KB/library/IntroducingLucene.aspx

Now you ask , twofold:

  1. Are you able to realistically unite the quest for "qualities each weekInch and the quest for "qualities within this specific region, costing 100,000 or less" right into a single database search?
  2. Will it buy you anything to think about/create something which does 1.)? (Particularly when you have something which works.)

Should you answer both questions with "Yes", then I'd say you have to extend the easy search. I guess you have a flag for every of the special cases ("property each weekInch, "property available", etc). Just add support of these flags for your simple search function.

Provide reasonable defaults for that search criteria and you will use simple search for the cases you referred to.