• marcosc (10/7/2008)


    Good article.

    Actually, with Nautilus [/url]you can find a table just writing part of its name and once located you can find a record writing any word which is compared with like if it's a string and with "=" if its an integer.

    The query is built for all the fields:

    select top 10 *

    from dbo.Customers (nolock)

    where CustomerID like '%ana%' or CompanyName like '%ana%' or ContactName like '%ana%'...

    Once the record is located, you can see it's related records (following the FK links).

    There is also a "google like" search where you write a word or number and looks for it in the whole database.

    Not much like google, but it works for developers.

    Thanks, Marcos (http://sourceforge.net/projects/nautilus/[/url])

    FTS actually builds an inverted index structure to search text fields, and allows some pretty complex searches that are more efficient than LIKE with leading wildcards, which can't take advantage of any indexes really. For tables with a large number of columns and a large number of rows, most of which aren't indexed at all, I would imagine the LIKE with leading wildcards could lead to serious performance issues.

    This actually sounds like it might be closer to the Google Base Data API Query Language (http://code.google.com/apis/base/query-lang-spec.html). The Base Data API Query Language actually gives you a lot of flexibility in performing searches, similar to what you're suggesting above, but would also have to be translated to SQL code at some point.

    Thanks

    Mike C