Microsoft Office Tutorials and References
In Depth Information
Tutorial B: Microsoft Access Tutorial
Defining the Employee Table
This table contains permanent data about employees. To create the table, click the Create tab and then click
Table Design in the Tables group. The table
s fields are Last Name, First Name, Employee ID, Street Address,
City, State, Zip, Date Hired, and US Citizen. The Employee ID field is the primary key field. Change the
lengths of text fields from the default 255 spaces to more appropriate lengths; for example, the Last Name
field might be 30 spaces, and the Zip field might be 10 spaces. Your completed definition should resemble the
one shown in Figure B-3.
Fields in the Employee table
When you finish, click the File tab, select Save Object As, and then enter a name for the table. In this
example, the table is named Employee. Make sure to specify the name of the table, not the database itself. (In
this example, it is a coincidence that the Employee table has the same name as its database file.) Close the
table by clicking the Close button (X) that corresponds to the Employee table.
Defining the Wage Data Table
This table contains permanent data about employees and their wage rates. The table
s fields are Employee ID,
Wage Rate, and Salaried. The Employee ID field is the primary key field. Use the data types shown in
Figure B-4. Your definition should resemble the one shown in Figure B-4.
Fields in the Wage Data table
Click the File tab and then select Save Object As to save the table definition. Name the table Wage Data.
Defining the Hours Worked Table
The purpose of this table is to record the number of hours that employees work each week during the year.
The table
s three fields are Employee ID (which has a text data type), Week # (number
long integer), and
Hours (number
double). The Employee ID and Week # are the compound keys.
In the following example, the employee with ID number 08965 worked 40 hours in Week 1 of the year
and 52 hours in Week 2.
Employee ID
Note that no single field can be the primary key field because 08965 is an entry for each week. In other
words, if this employee works each week of the year, 52 records will have the same Employee ID value at the
Search JabSto ::

Custom Search