Tree View
Tree
List View
Alphabetical List
Share
Share
Search:
id:
61

name:

Table Best Practices



description:

Naming a Table


When you are creating a table, the table name should be the thing you want to keep track of, ie: "Customers", "Projects" or "TeddyBears". The name you choose should not have spaces and cannot be from the list of Reserved Words.

Creating Fields


Fields are also known are records and are sometimes referred to as columns.

A Field name for the data we want to collect about our "thing" is the type of data we want to keep track of. For example, we may wish to store our TeddyBears Names, so we enter "Name" in the first field. Other fields we may want to keep track of would be FurColor, DateAcquired, Height, etc. The name you choose should not have spaces and cannot be from the list of Reserved Words.

Selecting Field Data Types


Next we have to decide which type of data "BearName" is (see datatype). We choose which type of data this will be from the datatype drop-down list. If the datatype is a number, a date/time, or text, we choose from the first part of the drop-down list. BearName would be plain text, so we choose "Single-line text - 50 characters". We limit the length of the field to 50 spaces, because we don't want people to enter a lot of text in this field.

Creating from a Look-up Table


If we already have a table called 'FurColor' that lists colors of fur, we could choose furcolor from a drop-down/pick from/look-up table when we were choosing the datatype for the FurColor field. This would enable users entering data in the FurColor field to choose from a drop-down list of fur colors. You can choose these when the data entry options for a field already exist in a separate table. This will link the fields to other tables in your database. See Look-up Tables




ParentTopic: