data types and field properties - public schools of ... · when to use data types: think of data...

12
Data Types and Field Properties 5.01 Understand database tables used in business.

Upload: others

Post on 10-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Data Types

and

Field Properties

5.01 Understand database tables used in

business.

Page 2: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

5.01 Understand database tables used in business. Side 2

It’s All in the Details

Let’s dig a little deeper into the details of how data is formatted and represented in database tables

Page 3: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

5.01 Understand database tables used in business. Side 3

Data 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

Page 4: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Why are data types important? To control data.

In the example on

the left, the Age data

was sorted in

descending order,

but because the

data type was not

set as Number, the

field cannot be

sorted correctly.

5.01 Understand database tables used in business. Side 4

In the example on

the right, the

Adoption data was

correctly sorted in

ascending order

because the data

type for Date was

used.

Page 5: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Example of a Data Type

The data

type for the

adoption

date field is

date/time

5.01 Understand database tables used in business. Side 5

Page 6: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

What data types are available?

Text

Memo

Number

Date/time

Currency

AutoNumber

Yes/No

Lookup Wizard

5.01 Understand database tables used in business. Side 6

Note: OLE Object and Hyperlink data types are not

addressed in this objective.

Page 7: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

When to use data types:

Think of data types

and field properties

as tools that

increase the power

of the database.

The default format

for all data types is

text.

Use a different

data type if you

need to control

how the data in a

particular field will

be searched,

sorted, or used in

calculations.

5.01 Understand database tables used in business. Side 7

Page 8: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Why are field properties

important? To control how data is

entered in a field

Requiring the same

format for all of the

phone numbers is a

way to ensure

accuracy

5.01 Understand database tables used in business. Side 8

In this example, an Input Mask field property was used to

force the user to enter the telephone number in a specific

format.

Page 9: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Example of a Field Property

5.01 Understand database tables used in business. Side 9

An input mask

field property is

used for the

Adoption Date

field to make sure

the date is

entered correctly

Actual

Data

Page 10: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Field Properties:

5.01 Understand database tables used in business. Side 10

Field Size

Format

Input mask

Caption

Note: Only 4 field properties are mentioned and

addressed in this objective.

Page 11: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

When to set field properties:

Use a field property if you want to

specify how the data is entered, what

data can be entered, and how the data

will appear.

5.01 Understand database tables used in business. Side 11

Page 12: Data Types and Field Properties - Public Schools of ... · When to use data types: Think of data types and field properties as tools that increase the power of the database. The default

Steps in Creating a Database

1. Plan the structure of the database (sketch on paper)

a) How will the data be grouped?

b) What will the field names be?

c) What will you name the database?

2. Open and save a new database

3. Create a table

4. Enter the field names

a) Set the data types

b) Set the field properties

5. Enter the data

5.01 Understand database tables used in business. Side 12