Query Generator Slide Show
on each underlined link as you read)
First, we need to
create a query document
Then, we get a
choice of query form
Once logged in,
this is your main query dialog
Let's find out what percentage
of customers ordered products. This
demo is being run with DBsurfer just "out of the box".
- What is it we need
to do? Calculate a percentage.
- For which entity?
- Specify a link or
a filter condition? We'll need a link
(to the products entity.)
- So it's a verb. Use
the default verb for now.
- All the applicable
entities you can link to at this stage are shown. Choose
we have a query (notice the Ready... button). Also notice that
the query could be extended (there is still a choose a phrase caption
visible in a dropdown list.) Clicking on Ready... produces the lower
Dispatch (or Run) dialog. The query cannot be saved as a virtual
entity because it just calculates a percentage, so this option is not visible
in the Dispatch dialog. The result is obviously just going to be a
number - not very interesting...
- ... instead,
let's look at the SQL that was transparently
generated. Perhaps it's not as simple as you expected - it just depends on
the structure of the database. DBsurfer SQL relies heavily on bracketed SQL
because your query could have mixed OR and AND terms within the subquery.
In this case the brackets are partially redundant - for now.
- Let's extend the query
and actually list the applicable customers.
Notice the other available choices mentioned in step 7 above.
is the list in an answer window. We also sorted by city.
The two windows are overlapped to show the final query.
- Now for a little maintenance
to improve the language. First we'll
change some database attribute names.
- Then, we
define a new verb relating customers directly to order items.
Using the same technique
as above we'll design a new query
and run a report for it.
Since the report design
is wizard-based, we'll only look at relevant steps, like the optional
(local) sort by city.
We sorted in order
to allow grouping by city - here is
the wizard step that enables grouping.
Another useful step
is the layout format of the report
- choose from preset formats.
You can optionally
modify the report design manually.
Everything is icon based and drag-and-drop.
is the final report; we added sub-averages by city, jazzed up the title
and used the report design preview tab to show it. Took 60 seconds.
If you'd like to re-run
a report, modify it, or reprint it, you can find it in a
listing of all existing reports.
Sometimes you need
to see information graphically. Let's
export the answer to a spreadsheet...
and graph it.
Queries can be saved
and re-run. To find them use the Find utility - it shows each query's
text. The one shown is for a query involving an outer
Oh, one last thing
- this is what the database looks like. You can
use this window to at least become familiar with it. For example, we used
one of its features to display the attributes of the product entity.
- These changes take
effect immediately, even while the affected query is open.