Database Reference
In-Depth Information
Figure 1.2
An Apache access log file.
nothing more than data on how two or more other tables are related. In relational database
theory, tables are called relations.
Columns
Any table will have a set of attributes, that is, a list of types of items that each table will store.
In this topic we will refer to this attribute as a column. In the old-style databases you would
have called this a field.
If you look at Figure 1.2 you will see that each column contains a specific type of data.
The first column contains the IP address of the machine that is accessing the webserver. The
second and third columns appear to store nothing, which is represented as a hyphen char-
acter (-). The fourth column contains the date and time that the access took place. The fifth
contains the HTTP command that was received and the columns continue.
Each column in a table has a unique name within that table, and that is how we refer to
the column. So based on the information that we have from Figure 1.2 we could begin to
define the table as follows:
Log(ip, accesstime, http_command)
Log is the name of the table, and ip , accesstime and http_command are the columns. A
table does not need to have data within it to be classed as a table. A table with no content is
still a table. This description of the database structure without actual data is known as
meta-data. The meta-data also contains details about any restrictions of access to the data-
base as well. You will also notice that each column contains data of a specific type. The first
column is a collection of four numbers separated by stops. The next two could be strings,
and then the last two columns in the figure are numbers. All data in a column must be of the
Search WWH ::




Custom Search