Re: Tool to check why queries miss results?

From: Martijn Tonies <m.tonies_at_upscene.removethis.com>
Date: Mon, 6 Mar 2006 21:08:10 +0100
Message-ID: <120p5lksjs09ida_at_corp.supernews.com>


> > So, he tells the magic tool:
> >
> > A) This is the Query i executed
>
> Good so far.
>
> > B) This is what results i got (the tool can get that
> > itself of course)
>
> Good so far.
>
> > C) This is a value i would have expected to get, but
> > didn't.
>
> How can you possibly know what you should have expected. I

If you're running tests, you can always start with the same test database and test data.

Next, you would have the expected result (stored somewhere in the test for a testing tool) and you have to compare that with the returned result.

That's how these tools usually work - so first, you tell it what to expect, next you perform the query and check the results. If the two don't match, you'll flag the test as "failed".

However, I do not know of any readily available database testing tools :-(

-- 
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


> know you think this is possible but it isn't. Here's an
> example. I have a table that looks like this:
>
> SEATTLE January
> LONDON June
> LONDON June
> SEATTLE February
> LONDON July
>
> Here is my first query:
>
> SELECT city_name
> FROM mytable
> WHERE month like 'J%';
>
> Here is my second query:
>
> SELECT city_name
> FROM mytable
> WHERE month like 'Ju%'
>
> Do I have a right to complain that the tool should have known
> I really wanted January? No. If I wrote the second query I am
> am unqualified and need to be trained or replaced.
>
> > I don't look for such a tool because i couldn't debug
> > such a problem by hand. I look for such a tool because
> > i'd prefer to debug such a problem in 5 seconds instead
> > of 5 hours. And if there is no such tool out there,
> > i'll probably go and write one myself, sooner or later.
>
> The tool you want does not exist and the technology to create the
> tool you want will not exist in my lifetime. And I am planning to
> live a very long time.
Received on Mon Mar 06 2006 - 21:08:10 CET

Original text of this message