Database Basics.

Top  Previous  Next

Databases are organized collections of information called tables. A table organizes data into a series of rows and columns. For example here is a simple table:

 

Station

Calcite

Gypsum

Water

PH

CA1

True

False

True

5.2

CA2

False

True

False

6.3

CA3

False

True

True

6.7

CA4

True

False

True

5.5

As you can see, each column has a name and contains a certain type of data. For example, the first column is called "Station" contains a station name. The second column is called "Calcite" indicates the presence of calcite at that station The final column is called "pH" and gives a pH value for moisture collected at that station. Each item in the database is called a "field" and each field can hold a different type of data. For example, the first field holds a group of text characters called a "string." The second field holds a true/false value called a "Boolean." The final field holds a numerical value called a "float." All in all, there are 16 different types of data that can be placed in a table including monetary values and pictures.

 

Fields. When you create a database, you must decide what the columns or fields in the data will hold. Once you have filled in the basic structure of the database by defining the fields, you then enter data into the table.

 

Querying. When the table has been filled with data, you can then ask the database to give you certain portions of the data. This process is called "querying" the database. In the querying process, you tell the database to test certain columns looking for data that match the query. For example, in our sample database, you could ask the database to give you all the rows where the pH is greater than six. In this example, it would return the rows for stations CA2 and CA3.

 

With CaveBase, you can create very complicate queries that check, test and compare several different columns of data. For example, you could ask the database to return rows here the pH is greater than six and there is water present. This query would return only the row for station CA3.