XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.

Slides:



Advertisements
Similar presentations
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Advertisements

Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
Access Tutorial 3 Maintaining and Querying a Database
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Querying a Database Microsoft Office Access 2003.
Concepts of Database Management Sixth Edition
Build a database IV: Create queries for a new Access database Overview: Ask your data — create queries It’s time to create queries, one of the most powerful.
Access Tutorial 3 Maintaining and Querying a Database
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Maintaining and Querying a Database Microsoft Access 2010.
DAY 16: ACCESS CHAPTER 2 Tazin Afrin October 10,
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 3-1 LINKS TO OBJECTIVES Save a Filter as a Query Save a Filter as a Query Parameter Query Inner, Left,
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 3Advanced Query Techniques.
Concepts of Database Management, Fifth Edition
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access Committed to Shaping the Next Generation.
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
Building and Using Queries. Objectives Use the Query WizardUse the Query Wizard Work with data in a queryWork with data in a query Use Query Design ViewUse.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Concepts of Database Management Seventh Edition
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Using Special Operators (LIKE and IN)
Concepts of Database Management Seventh Edition
 Agenda 2/20/13 o Review quiz, answer questions o Review database design exercises from 2/13 o Create relationships through “Lookup tables” o Discuss.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Access Queries Agenda 6/16/14 Review Access Project Part 1, answer questions Discuss queries: Turning data stored in a database into information for decision.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Creating Advanced Queries and Enhancing Table Design.
Microsoft Office Access 2010 Lab 3
Microsoft Office Illustrated Introductory, Windows Vista Edition
Access Tutorial 3 Maintaining and Querying a Database
Access Chapter 2 Querying a Database.
Objectives Query for top values Create a parameter query
Microsoft Access 2003 Illustrated Complete
Building and Using Queries
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Microsoft Office Illustrated Introductory, Windows XP Edition
Assignment 3 Querying and Maintaining a Database
Tutorial 5 Advanced Queries and Enhanced Table Design
Presentation transcript:

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 2 Chapter Introduction Filter data in Microsoft Office Access 2003 database  Retrieve and examine only records you need Sort data  Rearrange records in specified order Queries  Provide quick answers to business questions

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 3 Filtering and Sorting Data Filter  Restricts data in single table to create temporary subset of records  See only certain records in table based on specified criteria Sorting records  Organizing in particular order or sequence  Sort records regardless of whether table filtered

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 4 Filtering by Selection Tools  Filter by Selection Select particular field in datasheet Display only data that matches contents of field Specify only one criterion for filter  Filter by Form

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 5 Using Filter by Selection to Display a Temporary Subset of Records

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 6 Filtering by Form Specify two or more criteria Filter for comparative data  Use comparison operators AND criteria  Selects records that contain all specified values OR criteria  Selects records that contain any specified values

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 7 Sorting Data to Increase Information Content Organizes data and increases information value Access sorts records based on primary key values  Use sorting to change order To sort  Select sort field Sort on multiple fields  Move fields in datasheet view so that they are adjacent

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 8 Sorting Data To Increase Information Content Primary sort field  Access sorts records by this field first

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 9 Sorting Types of Data

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 10 Using Queries to Answer Business Questions Query  Database object  Stores criteria for selecting records from one or more tables  Save query Use it again  More powerful than filter Display only some fields in table Create fields that perform calculations

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 11 Using Queries to Answer Business Questions (continued) Capabilities of Access queries:  Display selected fields and records from table  Sort records on one or multiple fields  Perform calculations  Generate data for forms reports and other queries  Update data in database  Find and display data from two or more tables  Create new tables  Delete records in table based on one or more criteria

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 12 Using Queries to Answer Business Questions (continued) Select query  Ask question based on one or more tables in database  Result displayed in datasheet Called recordset

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 13 Using the Simple Query Wizard to Create a Query Simple query wizard  Presents list of tables and queries in database And fields that they contain  Select fields from one or more tables  Wizard creates and displays results

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 14 Advantages and Limitations of the Simple Query Wizard

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 15 Including Summary Statistics in a Query for Data Analysis Summary query  Groups records  Calculate sum, average, minimum, or maximum value in each selected field  Count records in table or query Click summary options button

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 16 Creating a Summary Query with the Simple Query Wizard

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 17 Creating a Query in Design View Select query window in Design view has two sections  Area for field lists at top of window  Design grid below it Add tables for query to top part of window  Appear as field lists Query by example (QBE)  Typing search value as a criterion

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 18 Query Design View Tools

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 19 Creating Queries with Multiple Criteria Most queries involve more than one criterion Represent AND criteria  Entering conditions in same criteria row in query design grid Specify OR criteria  Use “or” row of query design grid

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 20 Setting Criteria for the Query in Design View

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 21 Specifying Sort Order in Queries Query results appear in same order as data from underlying tables  Unless specify sort order when designing query Sort order determined from left to right Multiple columns must be adjacent to sort on more than one field in datasheet view

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 22 Running a Query Click Run button on query design toolbar  Access displays datasheet of records Save query  Save only design  Not values from tables displayed in results

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 23 Using Wildcards for Inexact Query Matches Wildcard character  Placeholder  Stands for one or more characters Memo fields  Use same keywords throughout memos  Easily retrieve records later  Use wildcards when specifying keyword as a query criterion To select records that contain characters before and after keyword

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 24 Wildcard Characters Used in Queries

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 25 Using Wildcards for Inexact Query Matches (continued) Access inserts  Word “LIKE” for criteria with wildcards quotation marks around text LIKE “*Spanish*”  Pound signs around dates #12/*/2008#

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 26 Comparison Operators

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 27 Comparison Operators (continued)

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 28 Verifying and Printing Query Results Verify query results before  Distributing query to others  Using it as basis for decisions Use business knowledge  Determine whether results adequately answer question Print query datasheet

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 29 Modifying Query Datasheets Improve appearance of query or table datasheet Resize column widths in any datasheet  Double-click line between field names to resize columns to best fit

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 30 Formatting Options for Query and Table Datasheets

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 31 Level 1 Summary Use filtering and sorting to change data display Develop queries using  Simple query wizard  Design view Use comparison operators and wildcards to make queries more flexible Verify query results using business knowledge

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 32 Level 2 Objectives: Creating More Complex Queries Design queries that compare data from more than one table Refine table relationships by specifying the join type Perform calculations in queries Customize queries and their results

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 33 Evaluating Data Using Special Types of Queries

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 34 Using Queries to Find Duplicate Records Duplicates Query Wizard  Searches for duplicate values in fields  Improve business operations  Designed to identify records that contain same information in particular field

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 35 Using Queries to Find Unmatched Records Find Unmatched Query Wizard  Compares records in two specified tables or recordsets  Finds all records in one table or query that have no related records in second table or query  Requires that two tables being compared have common field

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 36 Limiting the Records in the Query Results Limiting results to only a few records often aids analysis Top Values query  Sorts and then filters records  Display specified number of records that contain top or bottom values  Top Values list box on query design toolbar

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 37 Top Values Query Design and Results

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 38 Using Parameter Values in Queries Parameter values  Phrase usually in form of a question or instruction  Enclosed in square brackets  Serves as prompt to user to enter value  Example [Enter a job ID]

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 39 Parameter Query to Allow User Input when the Query Is Run

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 40 Analyzing Data from More than One Table Data from more than one table required to answer question  Combine records from two or more tables  Display only information needed Work in design view to specify criteria for selecting records from multiple tables Lines between tables link primary key to foreign key field  Primary key designated with 1  Foreign key designated with ∞

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 41 Analyzing Data from More than One Table (continued) Join tables  Linking of tables using primary and foreign keys  Established relationship  Or Each table shares field with same or compatible data type One join field primary key If tables do not include fields that can be joined  Add one or more extra tables or queries  Link tables that contain the data

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 42 Analyzing Data from More than One Table (continued) Use queries as source of underlying data for another query in place of one or more tables Create queries based on more than one object  Should not use any table or query that does not have common field with at least one of the other tables or queries  Otherwise Access displays every combination of records between two tables

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 43 Refining Relationships with Appropriate Join Types Inner join  Displays all records in one table that have corresponding values in common field in another table  Records must match before being displayed in query results Outer join  Display all records of one table  Regardless of whether corresponding record stored in related table

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 44 Inner Join

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 45 Left Outer Join

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 46 Right Outer Join

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 47 Refining Relationships with Appropriate Join Types (continued) Outer join types  Left  Right Use join properties dialog box  To change join type  By default tables related using inner joins

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 48 Using Logical Operators to Specify Multiple Conditions Logical operators  Test values that can only be true or false Place conditions in separate fields in same criteria row of design grid  All conditions in row must be met to select record NOT logical operator  Excludes values that don’t meet criterion

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 49 Logical Operators

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 50 Performing Calculations with Queries Any information derived from fields in table or query should be calculated in query  Rather than included as data in table Calculation types  Predefined Compute amounts for groups of records or for all records combined in query  Custom Performs numeric date and text computations on each record Using data from one or more fields

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 51 Calculating Statistical Information Aggregate functions  Arithmetic and statistical operations  Apply to records that meet query’s selection criteria

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 52 Aggregate Functions

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 53 Using Aggregate Functions in a Query

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 54 Creating Calculated Fields in a Query Expression  Arithmetic formula used to make calculation  Use standard arithmetic operators  Use parenthesis for complex expressions Calculated field  Add to query design grid  Type expression Expression builder  Build complex expressions

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 55 Creating Calculated Fields in a Query (continued) Function  Perform standard calculation  Return value Date()  Provides today’s date Field properties  Change format and number of decimal places for calculated field

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 56 Field Properties

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 57 Concatenating in Queries Concatenation  Combining contents of two or more fields  Operator &  Example Name [EmpFirst]& " " & [EmpLast]

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 58 Level 2 Summary Use queries to select data from more than one table Join types  Inner  Right outer  Left outer Calculated field types  Predefined  Custom

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 59 Level 3 Objectives: Exploring Advanced Queries and Queries Written in Structured Query Language Calculate and restructure data to improve analysis Examine and create advanced types of queries Make decisions in a query using the immediate IF (IIF) function Develop queries using SQL

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 60 Analyzing Query Calculations Crosstab queries  Special type of totals query  Performs aggregate function calculations on values of one database field  Determine exactly how summary data appears in results  Calculate and restructure data Analyze it more easily  Work especially well with time-series data

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 61 Creating a Crosstab Query To create use  Crosstab query wizard Often need to create query first  Or design view Start with select query that includes numeric values or summary calculations

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 62 Crosstab Field Settings

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 63 Modifying Data Using Queries Action queries  Modify data in table  Add records to or delete records from table  Create new table Backup data before using action query

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 64 Access Action Queries

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 65 Process for Archiving Data

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 66 Archiving Data with Make-table Queries Make-table query  Creates table from some or all of the fields and records in existing table or query  Access does not delete selected fields and records from existing table

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 67 Adding Records to Tables with Append Queries Append query  Select records from one or more tables by setting criteria  Add those records to end of another table  Selected records also remain in original tables  Table to which records added must already exist  Also use to bring data from another source into database

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 68 Removing Records from Tables with Delete Queries Delete query  Removes information from table  Based on specified criteria  All records meeting criteria permanently removed from table Create select query first  Convert to delete query Cascading deletes

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 69 Updating Data with an Update Query Update query  Changes values of data in one or more existing tables  Create select query first Change type to update query

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 70 Making Decisions in Queries IF statement  Tests condition  Takes one action if condition true  Takes another action if condition false IIF function  Make if decision  Format IIF(condition to test what to do if true, what to do if false)

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 71 Customizing Queries Using Structured Query Language Access designed as database management system (DBMS) for  Small businesses  Or departments within large businesses Structured query language  Common query language of most DBMSs  Use to query, update, and manage relational databases Create query in design view  Access translates entries and criteria into SQL statements

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 72 Customizing Queries Using Structured Query Language (continued) View statements by switching from Design view to SQL view SELECT statement defines  What data query should retrieve from database  How it should present data

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 73 Exploring the Components of an SQL Query Keywords  Use to construct SQL statements Most developers place each statement on separate line  To make SQL code easy to read

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 74 Common SQL Keywords

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 75 Level 3 Summary Action queries  Make new tables  Append data  Delete data  Update data IFF function SQL  Use SQL view to edit SQL directly

XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 76 Chapter Summary Queries retrieve data from one or more tables  Action queries update data  Perform calculations  Make decisions using IFF function SQL  Used to interact with relational databases  Use SQL view to view/edit SQL statements generated by Access