Microsoft Office Tutorials and References
In Depth Information
Guidelines for Setting Field Properties
Determine the properties of each fi eld. You need to identify the properties , or
characteristics, of each fi eld so that the DBMS knows how to store, display, and process the
fi eld values. These properties include the fi eld’s name, maximum number of characters
or digits, description, valid values, and other fi eld characteristics. You will learn more
about fi eld properties later in this tutorial.
The Invoice and Customer tables you need to create will contain the fi elds shown in
Figure 2-2. Before creating these new tables in the Belmont database, you fi rst need to
learn some guidelines for setting fi eld properties.
Guidelines for Setting Field Properties
As just noted, the last step of database design is to determine which values to assign to
the properties, such as the name and data type, of each fi eld. When you select or enter a
value for a property, you set the property. Access has rules for naming fi elds and objects,
assigning data types, and setting other fi eld properties.
Naming Fields and Objects
You must name each fi eld, table, and other object in an Access database. Access then
stores these items in the database, using the names you supply. It’s best to choose a fi eld
or object name that describes the purpose or contents of the fi eld or object so that later
you can easily remember what the name represents. For example, the three tables in
the Belmont database will be named Contract, Invoice, and Customer because these
names suggest their contents. Note that a table or query name must be unique within
a database. A fi eld name must be unique within a table, but it can be used again in
another table. Refer to the ProSkills box, “Decision Making: Naming Database Fields and
Objects in Access,” in Tutorial 1 for a reminder of the guidelines to follow when naming
fi elds and database objects.
Assigning Field Data Types
Each fi eld must have a data type, which is either assigned automatically by Access or
specifi cally by the table designer. The data type determines what fi eld values you can
enter for the fi eld and what other properties the fi eld will have. For example, the Invoice
table will include an InvoiceDate fi eld, which will store date values, so you will assign
the Date/Time data type to this fi eld. Then Access will allow you to enter and manipulate
only dates or times as values in the InvoiceDate fi eld.
Figure 2-4 lists the most commonly used data types in Access, describes the fi eld
values allowed for each data type, explains when you should use each data type, and
indicates the fi eld size of each data type. You can fi nd more complete information about
all available data types in Access Help.
Search JabSto ::

Custom Search