01 June 2006

Databases for Laypeople: Part 1 in a series

(Table of Contents)

A database is a collection of information that needs to be managed in some way. This could be as simple as a list of names with phone numbers. You can also have several values, or fields, per record. So, for example, here is a two-dimensional table in which each country is a record, and each year is a field. Needless to say, this table only is concerned with one matter: the entire human population in a particular year.

In the chart below, the database includes population for several different age categories, for each year, for each country. This requires a 3D-database because each field has 3 dimensions: year, age, and country. Obviously, I could add an endless number of dimensions.



The organization of data can befar more complicated that this; there can be a need to find, for example, the population of working women in Europe aged 40-44 years.

Complexity in the data organization can arise in another way. Another standard organization of data is hierarchy (like a family tree; see chart below). As it hapens, the family tree is the standard illustration of a hierarchical database: each relationship is a parent-child relationship. Each parent may have several children, but each child has only one parent (in database terminology).


Click for larger image


However, in real-life applications, it's not unusual to have many interlocking hierarchies. Consider the case of a chemistry lab that performs tests on soil. The lab runs three different tests on each sample, but the samples for a particular client are distributed among different runs of each test. The instruments, in other words, have information about the contents of each sample in each batch, and the database management software (DBMS) has to link the samples to different customers:




This chart is extremely simple compared to an actual lab, where "Company A" may be a sample firm that collects samples for a different companies and requires separate lab reports for its clients. In this case, the challenge for the database designer is getting several interlocking trees (or hierarchies) of data to connect, with each member sometimes occupying different levels in the hierarchy.

(Part 2)

Labels:

0 Comments:

Post a Comment

<< Home