Skip to content

Introduction

Thoroughbred Query-IV is a major component of Thoroughbred Dictionary-IV and OPENworkshop.

Thoroughbred Dictionary-IV is a primary component of the Thoroughbred a fourth generation language (4GL) and OPENworkshop. It is a dictionary-driven system that provides a database manager, menu manager, screen developer, message dictionary, and help manager.

The other major components are Thoroughbred Script-IV and Thoroughbred Report-IV. These
components require separate manuals to describe their functions.

Thoroughbred Query-IV makes use of a query language to help you get the information you need quickly. A query language contains words and symbols that you can use to request information from the database.

With Query-IV you do not have to use a query language, but instead let Query-IV create your query quickly and easily through selection windows.

If you prefer to use a query language, Query-IV uses a query language similar to SQL (Structured Query Language).

You can easily query a database and save and recall the query. This is a capability normally provided with embedded query languages, which allow you to embed queries in programs. Once you save a Thoroughbred Query, you can execute it from a Menu, Script (4GL program), or from Query-IV.

Database A database is an organized collection of information or data. For example, a telephone directory database would include Data Names like name, address, and telephone number.

SQL The American National Standards Institute (ANSI) has defined a standard version of SQL based on the IBM version, and the International Standards Organization (ISO) has in turn defined an international standard based on the ANSI definition.

If you know SQL, Thoroughbred Query-IV will be familiar to you. If not, you will find Thoroughbred Query-IV is easy to learn.

A table is the result of a query. It contains information in vertical columns and horizontal rows, displayed in a two-dimensional, rectangular shape. A table can contain any number of columns and rows.

Each item of information in a column or row is called a field. A field is the intersection of a row and column.

The database that handles all information in terms of tables is known as a relational database. A relational database allows you to use tables without regard to how the information is physically stored in the computer. This makes it easier to get the information you need.

Query languages use a relational database. Tables, columns, and rows are relational database terms. If you are familiar with the terms describing a physical database, such as files, records, and Data Names, it may help to associate these with the terms describing a relational database.

Tables are files, rows are records, and columns are Data Names.

Although these terms are similar, they are not synonymous. One reason is that a relational database is a logical or conceptual structure that can be independent of the underlying physical database.

A table can represent information from part of a file or from more than one file.

A row can represent information from part of a record or from more than one record.

A column can represent information from part of a Data Name or from more than one Data Name.

A database is an organized collection of information.

The telephone directory is a database: the names, addresses, and telephone numbers are the data, and the names are organized alphabetically.

Diagram: LAST-NAME FIRST-NAME STREET CITY TELEPHONE Agassiz Rick 21 Hill St. Hot Springs 555-1889 Donato Elyse 94 Red Rd. Brookville 555-6391 Franklin John…

An ordinary dictionary is also a database. The words and definitions are the data, and the words are organized alphabetically.

A checkbook register, in which you record check payments, is another database: the date, check number, payee, payment amount, and account balance are the data, and the payments are organized by date and check number.

The database does not have to be stored in a computer; it can be stored in an ordinary filing cabinet filled with file folders.

Thoroughbred Dictionary-IV stores the information in computer data files. A database consists of one or more related files.

In the preceding examples, each database contained a single file. But a database can be as small or as large as you need it. The telephone database could contain additional files, depending on how much information you needed to control. This could be directories for all the areas in the state, all the states in the country, or all the countries in the world.

Files, Records, Fields
Dictionary-IV references files, records, and fields. In SQL terms they are equal to the following: