Microsoft Office Illustrated Introductory, Premium Edition Using Tables and Queries
2 Organize fields Plan related tables Create a table Modify a table Format a datasheet Objectives
3Using Tables and Queries Objectives Understand sorting, filtering, and finding Sort records and find data Filter records Create a query Modify a query
4Using Tables and Queries Organizing Fields Design the reports that you want the database to produce Collect the raw data that is required to produce the reports Identify a name and data type for each field
5Using Tables and Queries Creating Fields Select a short but descriptive field name Select the appropriate data type Add field descriptions and properties as needed
6Using Tables and Queries Choosing the right Data Type Data Type: sample fields Text: FirstName, Zip, Phone Memo: Comment, Note Number: Quantity, Units Date/Time: BirthDate
7Using Tables and Queries Choosing the right Data Type Data Type: sample fields Currency: Price, Tax AutoNumber: CustomerID Yes/No: Veteran, Exempt OLE Object: Photo, Resume Hyperlink: HomePage,
8Using Tables and Queries Choosing between the Text and Number Data Type Choose Text for Telephone, ZipCode, etc. fields that contain numbers but do not represent numerical values Text preserves leading zeros such as a zip code Text allows you to use the Input Mask property to control data entry
9Using Tables and Queries Planning Related Tables Separate the fields into specific subject areas Create sample records and examine the entries Identify a primary key field for each table Identify a common field to link tables in a one-to-many relationship
10Using Tables and Queries One-to-Many Relationship 1 many
11Using Tables and Queries Planning Related Tables The field on the “one” side of the relationship is usually the primary key field for that table The field on the “many” side of the relationship is called the foreign key field for that table
12Using Tables and Queries Creating a Table Methods: Database Wizard Table Wizard Table Design View Importing data
13Using Tables and Queries Modifying a Table Required Entries for a new field: Field Name Data Type Optional Entries for a new field: Description Property Changes
14Using Tables and Queries Modifying a Table Field Names Data Types Properties
15Using Tables and Queries Formatting a Datasheet Formatting (Datasheet) Toolbar Font Size Bold Italic Font/ Fore Color Line/ Border Color Grid- lines Special Effects Underline Fill/ Back Color
16Using Tables and Queries Understanding Sorting, Filtering, and Finding Sorting: reorganizing records in an ascending or descending order based on a field Filtering: isolating a subset of records Finding: locating a specific piece of data
17Using Tables and Queries Sorting, Filtering, and Finding Table Datasheet Toolbar Sort Ascending Sort Descending Filter By Selection Filter By Form Add or Remove Filter Find
18Using Tables and Queries Find and Replace Options Find What Look In Match Search Match Case
19Using Tables and Queries Wildcards Asterisk (*) = any group of characters Question mark (?) = any single character Pound sign (#) = any single number digit
20Using Tables and Queries Sorting Records Primary sort field Secondary sort field Telephone book example –LastName = Primary sort field –FirstName = Secondary sort field –Middle Initial = Third sort field
21Using Tables and Queries Finding Data Search Criterion Search Options Find and Replace dialog box
22Using Tables and Queries Filtering Data Apply Filter buttonClear Filter button Wildcard asterisk character is used Greater than or equal to operator is used Filter by Form window
23Using Tables and Queries Comparison Operators
24Using Tables and Queries Searching for Blank fields Is Null criteria will find all records where no entry has been made in the field Is Not Null criteria will find all records where there is any entry in the field, even if the entry is 0 Primary key fields cannot have a null entry
25Using Tables and Queries Creating a Query Methods: Simple Query Wizard Query Design View Methods
26Using Tables and Queries Query Design View Field Lists Query grid identifies fields in query Criteria to limit records
27Using Tables and Queries Queries versus Filters
28Using Tables and Queries Modifying a Query Change sort orders Add AND criteria (two criterion on the same row) Add OR criteria (two criterion on different rows) Add or remove fields from the query grid
29Using Tables and Queries Summary Build tables to store data Use Table Design View to define the fields of your tables Use table and query datasheets to view, sort, filter, and find data Create queries to answer “questions” about your data