Access 2003 Lesson 4
Access 2003 Lesson 4
Objectives
Page 2
Datasheet basics
The core component of a database is a table. Data is defined and stored in a table.
Multiple tables -- each consisting of different types of data -- can be created in a
database.
Each row in the database is called a record. The entry for John Smith is called a record.
The entry for Martha Tompkins is also a record. Each row or record is made up of
columns or fields -- L.Name, F.Name, Phone, Address, City, State, Zip -- which contain a
particular piece of information.
Page 3
Field Properties
Every table contains a number of columns called fields or datatypes. Fields are unique
pieces of information that make up the information in a table. Tables usually contain
multiple fields.
In a previous example we mentioned that a table might consist of the fields: Last Name,
First Name, Phone, Address, City, State, and Zip. Each field has unique properties. Some
contain characters. Others contain numbers. These Field Properties are defined when the
table is created.
Page 4
The same is true of your educational background. It has no direct bearing on your contact
information or the companies where you worked. A third table might be created called
the Education table to save this kind of data.
The database contains three tables, each independent of the other, and all containing
different types of information. The database needs a way to connect these three tables.
Page 5
Primary Keys
Every table in Microsoft Access must have at least one field that uniquely identifies each
record in the table. This field is known as a primary key. This primary key essentially
opens the door to the table and allows you to retrieve information from the table.
The primary key is the mechanism by which you relate different tables and combine
information for viewing (query) or printing (report).
Page 6
Challenge!
Let us pretend that you are going to start your own home business. You are going to need
to prepare a database for your business and the first step is to design a table that will
contain a list of all your contacts that may one day be your clients or suppliers.
Let us assume that a database table called Business Contacts contains all the fields listed
in the first column of the following chart. The chart also contains four other columns:
• Text, Numbers or Both -- should the field accept data entry input in the form of
text, numbers, or both?
• Field Size -- the number of spaces you think the field should have.
• Required Entry -- should the field be required entry (the record cannot be added to
the database without the information) or optional entry (a record can be added
without entry in the field)
• Allow Duplicates -- should the database allow duplicate entries for the field (e.g.,
can several people in the database share the same zip code)?
Text,
Required Allow
Numbers, or Field Size
Entry? Duplicates?
Both?
First Name
Last Name
Company
Company
Type
Address
City
State
Zip Code
Contact Id
Title
Work phone
Fax Number