In this section I shall design my database. I will make a total of 5 tables. 1. Customer Details Table 2. Jobs Table 3. Products Table 4. Suppliers Table 5. Employees Table

Authors Avatar

In this section I shall design my database.  I will make a total of 5 tables.

  1. Customer Details Table
  2. Jobs Table
  3. Products Table
  4. Suppliers Table
  5. Employees Table

From these tables I will be making all the outputs necessary such as queries reports and so on.  The design of each table is described in its respective section.

Tables:

The method to create a table is the same for any table I will be creating. The only difference would be some properties in the table. After I open Access, I start by creating a new database. This can be done by choosing New from the File menu. I then choose ‘Blank Database’ so that I get a completely empty database. I give my database a name and choose create. From the list of options that appear in the form of a box, I choose ‘create table in design view’. I can then enter the ‘field names’. Field names should be a sensible name according to the data required. Then I must choose a ‘data type’ for that field, i.e. whether it will contain text, only numbers, a currency value, the date, etc. I may give a description to the field but it is not necessary. It is only to make the field easier to identify incase for example; changes need to be made in the future.

Different fields will have different properties, which I can modify and set according to my need and liking. For example, for text fields, I can enter an ‘input mask’ which will form a standard set of data. This can only be applied to text fields and date fields. I will explain the different input masks as I create the tables. An example is a capital letter in all text fields. This makes them more organized and neat. When reports are printed, all similar fields will have data presented in the same way, regardless of how the user keyed in the data. This means that if the user enters the name of a customer all in capital letters, it will automatically be changed to only the first letter being a capital letter. When the user views the data, he will see it all in a similar pattern.

Because input masks can only be applied to text and date fields, I will use text fields for certain fields where I would normally use numbers, and apply a set pattern to them. Text fields can contain numbers, letters, and symbols, and so are suitable for this purpose. For example, I will create all my ‘Phone Number’ fields as text fields. This would also allow the preceding zero at the beginning of the number to be stored, since in a number field it will be eliminated. It will also allow the area code to be contained in brackets, which will make the data easier and more comfortable to read.

After I have entered all the fields and set their properties, I can make a key field. A key field is necessary to link tables using ‘relationships’ which will be described later. A key field identifies a record, and all the fields in it. It makes searching for records easier. I can make key field by choosing the record, and clicking on the key icon under the menu bar.

I then close the table. I will be prompted to save the table. I choose ‘Yes’ and give my table a name, then click on ‘OK’. If I hadn’t assigned a key field, I will be prompted to. I may always add fields to a table by selecting it and choosing the ‘design’ button in the database window, and adding as many fields as I need.

Customer Details Table:

This table will include all the information about the customer. The different fields and kinds of fields that shall be included in this table are shown in the table below.

All the fields I will be placing in the Customer table are shown above. I shall now place the different validation rules for entry in the fields. The table below shows what I plan to do.

Join now!

Note: I will put the 3 ‘type’ options, as well as the ‘emirate’ in a combo box when I create the form later. A combo box is a drop down list where the user can select an option, not having to manually type it in. The validation rule is still necessary because the user is still able to key in anything he wants regardless of the options in the combo box.

I shall now go on to put in the input masks for the table. The input masks I plan to place are shown below.

It ...

This is a preview of the whole essay