Navigation:  Queries >

Query - Components of a Query

Print this Topic Previous pageReturn to chapter overviewNext page

 

By definition, a query is much the same as a question. In the case of database queries, a user is asking their database a question. Computer programs use languages that we, as humans do not ordinarily use in our daily lives. In this case Queries acts as our interpreter. The Queries interpreter allows questions to be asked in a language that both the user and their database will understand.

Each Query may consist of one or more questions, logically connected with an AND or an OR logical operator. In order to complete a valid "computer" question Queries must collect three components of information: Field, Operator and Value. Given these three components, Queries will construct a meaningful question.

Field

The Field is representative of information contained within in the database (Product and Vendor Records). The field is therefore considered the subject of the question or what you would like to learn about. A few examples of fields would be Description (Product Name), MFG, Internet Link, Place to Buy, etc.

Operator

The Operator represents the comparison to be made between the Field and Value. Due to the nature of the value, operator selections for numbers are limited when compared to those for text. For example the most common numeric operators are Greater Than, Less Than or Equal To. The nature of text operators allow for such comparisons as Contains and Begins With. The Operation Selection guide discusses these issues in greater detail.

Value

The Value will be compared (via the operator) to the field in your Product or Vendor records. The value entry is the way you wish to describe the subject (field) of the question. In essence the value describes the trait the field should have (or not have). Queries offers many useful features to assist the user with their value consideration.

 

 


Page url: http://www.encouragersoftware.com/eclrpthelp/index.html?components_of_a_query.htm