New Zealand

Introduction to Databases

If database technology is new to you and you want an introduction to databases then read on. Below is an easy to understand outline of what databases are and some basics on how they work.

Databases are organised data structures. Similar items are grouped together into a table which can then be searched quickly to find detail on what you are looking for. An example of data in a table could be role of school pupils. Within the table there are fields of information, e.g.

Table: School Role
Fields
First name
Surname
Birth date
Gender
Home Address
Suburb
Home phone number
Pupil ID Code

The fields above make up a record in the table. One record is made for each pupil and the table can be configured to have as many fields and records as you need.

A database may have many other tables within it which contain different but related information. In our school example we could have a table that contains classes.

Table: School Classes
Fields
Class name
Room
Teacher
Year
Class ID Code

A new record would be created for each class and for each year. Now what if you wanted to know who was in each class? Some linking information is needed and this could be contained in a third table.

Table: Class Members
Fields
Pupil ID
Class ID Code

This table is interesting in that it does not contain any names of pupils or specifics about the class. It just contains the ID fields that link the other two tables together. This is called a relationship. If we were to include in this third table the pupil names or other information held in School Role or School Classes tables then we would be duplicating information and therefore creating inefficiency.

When the database is built these tables are defined and the relationships are established. Forms are designed for the users which hide these technical details in the background. The form sends the information to the right tables automatically.

Data organised in tables like this allow powerful reporting. Besides just sorting the data, you can do filtered searches. E.g. Who were the pupils of teacher Mrs Smith in year 1995? Find the pupils born after 1991 who lived in a specific suburb?
By adding another table into the database you could track exam results or sports played. Additional fields, tables, input forms and reports can all be added too at a later time.

The concepts of a database are reasonably simple, but in practice they are a specialist area. There are a number of database products that are available to help you write your own. A good example is Microsoft Access which is bundled in the Professional versions of Microsoft Office, or sold separately. The level of difficultly and time required to construct the mechanics of the database are much more complex than for example, writing a spreadsheet. Writing a database which is stable and reliable in a business environment is essentially in the domain of an expert custom database developer.