Query By Example

Top  Previous  Next

In Celebris, there is a utility called Query By Example (QBE) that exists in all of the data entry screens. The utility is initiated by pressing F5 or by choosing Query By Example from the context menu.

 

What query by example does is that the user enters some information (some clue) for the record that he/she wants to find. Then the system generates an appropriate command to find the record with the available information input by the user.

 

Let's give some examples from the airport screen. The airport screen looks like the following when we first open it:

 

ap1

 

Lets say we want to find an airport in Honduras, but we can't remember the code of the airport for the moment. We choose HN in the country box and then we press F5:

 

ap2

 

Celebris searches the airport database to find the airports in Honduras. The number of airports found is more than one. Since the airport window can display only one airport at a time, the system displays the information of the found airports as a list at the following record selection window:

 

selrec

 

Now we can double click on a row to select and display it at the airport screen. It is always possible to press ESC to cancel selection. Lets say we double clicked on the RTB airport:

 

ap3

 

For a single result selection example, if we knew the airport code, we could directly enter it in the Code area and then press F5 to initiate the QBE. Since the airport codes are unique, the search would return only one row. No further selection would be necessary and the record would directly be shown in the screen.

 

There are some special characters that we can use in the QBE search.

 

_

This underscore character can be used to specify any character (one and only one character)

%

This percent sign can be used in place of any number of arbitrary characters (zero or more characters)

 

Lets consider the following example:

 

ap4

 

We are trying to find an airport whose name begins with any character, the second and third letters must be oa, the fourth letter can be any character, the fifth letter must be a and the rest of the airport name doesn't matter. After choosing QBE, the following records are found:

 

sel2

 

So, when we are uncertain how to find what we want, we can use the joker characters to construct a flexible search.

 

This QBE system exists at all of the Celebris screens.