1. Data TypesData Types
andand
Field PropertiesField Properties
5.01 Understand database tables used in5.01 Understand database tables used in
business.business.
2. 5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 22
It’s All in the DetailsIt’s All in the Details
Let’s dig a little deeper
into the details of how
data is formatted and
represented in database
tables
3. 5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 33
Data Types and Field PropertiesData Types and Field Properties
Data types and field properties are used to
format data so that it can be used and managed
The data type defines the value of a cell and the
field property defines the format of the data
within the cell
For example: the data type for a zip code field
is number and the field property is used to
limit the size of the entry to 5 characters
4. Why are data types important?Why are data types important?
To control data.To control data.
In the example onIn the example on
thethe leftleft, the Age data, the Age data
was sorted inwas sorted in
descending order,descending order,
but because thebut because the
data type was notdata type was not
set as Number, theset as Number, the
field cannot befield cannot be
sorted correctly.sorted correctly.
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 44
In the example onIn the example on
thethe rightright, the, the
Adoption data wasAdoption data was
correctly sorted incorrectly sorted in
ascending orderascending order
because the databecause the data
type for Date wastype for Date was
used.used.
5. Example of a Data TypeExample of a Data Type
The dataThe data
type for thetype for the
adoptionadoption
date field isdate field is
date/timedate/time
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 55
6. What data types are available?What data types are available?
TextText
MemoMemo
NumberNumber
Date/timeDate/time
CurrencyCurrency
AutoNumberAutoNumber
Yes/NoYes/No
Lookup WizardLookup Wizard
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 66
Note: OLE Object and Hyperlink data types are not
addressed in this objective.
7. When to use data types:When to use data types:
Think of data typesThink of data types
and field propertiesand field properties
as tools thatas tools that
increase the powerincrease the power
of the database.of the database.
The default formatThe default format
for all data types isfor all data types is
text.text.
Use a differentUse a different
data type if youdata type if you
need to controlneed to control
how the data in ahow the data in a
particular field willparticular field will
be searched,be searched,
sorted, or used insorted, or used in
calculations.calculations.
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 77
8. Why are field propertiesWhy are field properties
important?important?
To control how data isTo control how data is
entered in a fieldentered in a field
Requiring the sameRequiring the same
format for all of theformat for all of the
phone numbers is aphone numbers is a
wayway to ensureto ensure
accuracyaccuracy
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 88
In this example, an Input Mask field property was used to
force the user to enter the telephone number in a specific
format.
9. Example of a Field PropertyExample of a Field Property
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 99
An input maskAn input mask
field property isfield property is
used for theused for the
Adoption DateAdoption Date
field to make surefield to make sure
the date isthe date is
entered correctlyentered correctly
Actual
Data
10. Field Properties:Field Properties:
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 1010
Field SizeField Size
FormatFormat
Input maskInput mask
CaptionCaption
Note: Only 4 field properties are mentioned and
addressed in this objective.
11. When to set field properties:When to set field properties:
Use a field property if you want toUse a field property if you want to
specify how the data is entered, whatspecify how the data is entered, what
data can be entered, and how the datadata can be entered, and how the data
will appear.will appear.
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 1111
12. Steps in Creating a DatabaseSteps in Creating a Database
1.1. Plan the structure of the databasePlan the structure of the database (sketch on paper)(sketch on paper)
a)a) How will the data be grouped?How will the data be grouped?
b)b) What will the field names be?What will the field names be?
c)c) What will you name the database?What will you name the database?
2.2. Open and save a new databaseOpen and save a new database
3.3. Create a tableCreate a table
4.4. Enter the field namesEnter the field names
a)a) Set the data typesSet the data types
b)b) Set the field propertiesSet the field properties
5.5. Enter the dataEnter the data
5.01 Understand database tables used in business.5.01 Understand database tables used in business. SideSide 1212
Hinweis der Redaktion
For example, you can use the field properties to make sure that users enter every shipping date with two numbers for the month, two numbers for the day, four numbers for the year, and slashes in between: 03/09/2008. You can also require that the shipping date be at least two days after the entry date.
Instruct students describe each field property by opening a database and clicking on each field property. A description will appear in the right-hand pane.
Instruct students describe each field property by opening a database and clicking on each field property. A description will appear in the right-hand pane.