Lesson 3ª

 

 

 

 

 

   

Introduction to Data Base Relationships

Since we know it is normal for a Client to purchase more than one article, we should have a Table with several Records for him.

The advantage of Data Base Relationships is that it dismembers the information in several more specialized Tables.

For example, we can have a table with the information of our "Clients":

And another one with the articles:

We might find that both tables have a common field, such as the "Client Code" field, for example.

We will use this "Client Code" field to link the Tables. It will work as some sort of "linking field" and any change done to one of them will affect the other(s).

It's primary use is in case our client number 1, (Jack in this case), changes his address, we would only have to modify his information in the "Client" table to automatically update the data in the other linked tables.

The handling mechanism is simple. Even if we were doing it manually, we would search for the article "Multiplex" in the "Article Table", and find the "Client Code". On the "Clients" table, we would search for the "Client Code" and there we can find the "Address Field". This is a simple process of "relating" 2 tables through a common field, such as "Client Code".

Our computer will do this task in the same manner, but instantaneous. Another advantage is the fact we can relate any table we need to be related. For example, we might also need a table for our "Suppliers"

In this case, we would need to relate the "Supplier" table to the "Articles" table through the "Article Code" field, and the "Article Table" to the "Client Table" through the "Client Code" field.

If the Company "Excellence SA" eliminated the product "Multiplex", we would only need to change this data in a single table for all of them to be updated instantly.

We can continue dismembering all the data in our tables to fit our needs. For example, we can create a table called "Sales" to relate a specific sale to a Vendor, and we can create as many "Relationships" as we need to our specifications.

The objective of Data Base Relationships is to obtain a higher degree of efficiency when handling large quantities of information. The best way to prove this is to find that there is no repeated data in all the Data Bases, except for the Autonumber fields we will be using as a link to relate the Tables.

When we begin creating our tables, you will find out that it is not a simple task to sort the necessary fields in a number of tables without repeating them and still being consistent. In other words, we need to be careful not to produce errors by duplicate data or the absence of it.

In the next lesson, we will learn how to properly plan our Data Bases to avoid this type of problems.