SI-WDB Help on Queries

  • Specifying Query Constraints.
  • Submitting Your Query
  • Tabular Output
  • Export Format Output
  • Controlling Tabular or Export Output
  • Other options

  • Specifying Query Constraints.

    When you first enter a SI-WDB query form you will see one or more query fields like this:

    Mammal Name :

    In each query field you can enter text to specify records to retreive from the database. You can also include operators to specify how the search is performed. These are the operators that are available for querying in the fields:

    <
    Less than.
    >
    Greater than.
    <=
    Less than or equal to.
    >=
    Greater than or equal to.
    !=
    Not equal to.
    =
    Equal to (with wild-cards, i.e. the * operator)
    ~
    As = but ignoring case.
    ==
    Exact match (No wild-cards)
    *
    Wild-card in strings ( A*B will match AB, AxB, AxxxxB, etc. ).
    ..
    A range of values (ex.: 234.56 .. 678.9 ).
    |
    OR
    Will match any of the specified expressions (ex.: =123 OR > 5000 OR < 1 ).
    So, for example, to select all names matching either "Panda" or "Bear" you could enter:

    Mammal Name :

    The default search, when you search in text fields without specifying an operator, is application-specific:

    For non-indexed text fields, it will usually be interpreted as "~*your-text*". That is, it will be a case-insensitive search for any match that contains the query string.

    For indexed fields, the default search is usually an "anchored" case-insensitive wildcard search (i.e., "~your-text*") so that the database management system can take advantage of the ordering of the index.

    For some index fields, such as numeric keys, the default search may be an "exact match" search (i.e., "==your-text").

    If you can't tell what the default is by checking the help documentation or trying some searches, you can always fully specify your search by using the operators described above.

    Some fields may have a fixed set of allowable values from which you can choose.
    Taxon........... :
    These fields normally have a default value of "ALL" which means: Accept all values in this field.


    Submitting Your Query

    To get the result of your query you have to submit it. At the bottom of the query form you will see a set of buttons like this:

    In order to to submit your request press the "Search" button. If you want to reset all the fields back to the way they were before you started entering qualifiers in them, press the "Reset" button. (You could try to edit the "Mammal Name" field above and then press the "Reset" button).


    Tabular Output

    If you submit a query that returns more than one row of data, you will see a list in tabular form like this:
    
    Common Name                                        taxon     
    American Black Bear (English)                      SPECIES   
    Asiatic black bear (English)                       SPECIES   
    Bear Cuscuses                                      GENUS     
    Bear or Black Tree-kangaroo                        SPECIES   
    Bearded Pig                                        SPECIES   
    
    There will typically be one or more columns where the values have hypertext links (i.e., it can be selected to retrieve a new WWW document). The values in the leftmost column will normally lead you to a full-screen version of the corresponding row, with all information available. Other columns may lead you to related data screens.
    Try it out!


    Export Format Output

    For some database applications, a menu option is provided to return the results of a query in a plain ASCII export format. This format is useful for subsequently importing the data into your own database or spreadsheet. The export format is a variable length field-delimited format with one record per line. You are able to specify the selection of which fields are included in this format.

    If you submit a query and want to save the results in the ASCII data export format, select the [Export] button on the query results screen. You will then see a list of records like this:

    Name Id^Common Name^Taxon
    12016^American Black Bear (English)^SPECIES   
    12019^Asiatic black bear (English)^SPECIES   
    1236^Bear Cuscuses^GENUS     
    1285^Bear or Black Tree-kangaroo^SECIES   
    14044^Bearded Pig^SPECIES   
    
    The first line lists the names of the included fields, separated by the field delimiter. You can then use your browser "SAVE AS..." function to store the text file on your local system.

    If there are more records matching the search criteria than the maximum number returned by a query, then use your browser's "BACK" function to return to the tabular query results screen and select "Retrieve next XX rows" at the bottom of the results table to get the next set of records.


    Controlling Tabular or Export Output

    The tabular or export format output will normally only display a subset of the columns available. However you are able to change the selection of which columns should be displayed.

    Each field in the query form is prepended with a toggle field, which indicates whether the field should be included in tabular or export format output or not. This toggle is not selected, so the corresponding field would not be included:

    Mammal Name :

    This toggle is selected so the corresponding field would be included in the tabular or export format output:

    Mammal Name :

    Sometimes additional fields can be chosen from a selection box under the query fields. This would look like this:
    Extra columns on tabular output:

    With many WWW browsers, several fields can be selected using the Ctrl key (Command key on Macs) and the left mouse button at the same time.

    When the export option is available, a selection will be usually be provided to include all fields in the export format output. This would look something like this:
    Extra columns on tabular or export output:

    Selecting Include All Columns in this case would be the same as checking all the checkboxes on the query form and selecting all the fields named in the selection box.

    Note: If there are no checkboxes or selection box on your query form, then this particular SI-WDB application does not support user-configured tabular or export format and the included fields are "hard-coded."


    Other options

    At the end of the query form there may be a few additional options that you can change if you need to. You may be able to force SI-WDB to use the full-screen output format even when your query returns more than one row by selecting the appropriate radio button:
    Use tabular output if more than one row is returned.
    Use full-screen output even when more than one row is returned.

    You can adjust the maximum number of rows to return at a time. Note that the maximum cannot be greater than 1000 rows.
    Return max rows.


    SI-WDB 1.4 Send comments to NHBWebmaster@si.edu
    Last update August 8, 1996