 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.

Slides:



Advertisements
Similar presentations
Microsoft ® Access ® 2010 Training Create queries for a new database.
Advertisements

Access Lesson 8 Using Advanced Queries Microsoft Office 2010 Advanced Cable / Morrison 1.
Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Access Lesson 2 Creating a Database
University of Nevada, Reno College of Business Administration What are we going to learn 9/27 – 9/29? 1. Answer questions about MS Access queries. 2. Understand.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
Access Tutorial 3 Maintaining and Querying a Database
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Chapter 2 Querying a Database
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Microsoft Access 2010 Chapter 7 Using SQL.
Access Tutorial 3 Maintaining and Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
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,
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access Committed to Shaping the Next Generation.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
 Continue queries ◦ You completed two tutorials with step-by-step instructions for creating queries in MS Access. ◦ Now must apply knowledge and skills.
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.
Concepts of Database Management Seventh Edition
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
® 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.
Chapter 3 Query and Report. Agenda Report types Report contents Report creation Report design view Query and dynaset Function and grouping Action query.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Access Chapter 5-Table Tricks, Advanced Queries and Custom Forms.
IS201 Agenda: 09/19  Modify contents of the database.  Discuss queries: Turning data stored in a database into information for decision making.  Create.
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
® 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.
 Review quiz. Answer questions.  Discuss queries: ◦ What is a query? Turning data stored in a database into information for decision making. ◦ You: Completed.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
Microsoft Office Illustrated Introductory, Windows Vista Edition
Larry Reaves October 9, 2013 Day 16: Access Chapter 2 Larry Reaves October 9, 2013.
Access Maintaining and Querying a Database
Building and Using Queries
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access: Queries III Participation Project
Microsoft Office Illustrated Introductory, Windows XP Edition
Chapter 3 Query and Report.
Assignment 3 Querying and Maintaining a Database
Tutorial 5 Advanced Queries and Enhanced Table Design
Presentation transcript:

 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 queries: Turning data stored in a database into information for decision making. Highlight key issues about queries Answer any questions about queries to prepare you to complete part 2 of the Access Project.

 A lookup field lets the user select a value from a list of possible values  You use a Lookup Wizard field in Access to create a lookup field in a table o Example: Contract – ContractType relationship 2

 Turning data stored in a database into information for decision making.  A query creates a “virtual table”.  Table vs query: o What is the difference between a query and a table? o What is the difference between a query datasheet and a table datasheet? o Why do we create queries when we already have the data in tables?

 Table contains structure of data, constraints and actual data. o Table is referred to as “underlying data”.  Query is a way to look at the data. o Queries seldom look at the complete contents of a table because tables are usually very big, with many columns and many rows. o A query reduces the number of rows and columns in the underlying data (tables) to provide information for decision making. o Queries “filter” the data; fewer columns, fewer rows, calculated fields, summarized information. o A query enhances the data in the underlying tables by added calculations and logical conditions.

 Design view: Used to structure a query. Referred to as “query by example” or QBE.  Result table: The table produced by the query. Shown in the datasheet view.  SELECT query window: The window displayed in design view that is filled out to produce a result table. Also called the query design grid.  Field row: The area in the SELECT query window used to define what columns should appear in the result table.  Criteria row: The area in the SELECT query window used to identify which rows should appear in the result table.

 Each value in a field has very specific data coded for a computer to read.  Humans can discern vague similarities and differences among data fairly easily. Computers are more exacting.  Computers need you to tell them when data is a date, or a character, or a number.  A zero is not the same as a blank which is not the same as a null.  A null is a special character assigned to a field that technically has “no value”. It is very useful because we can search for a null value with special operators.

 Generalized queries o Using one or multiple tables o Specify the fields and records you want to Select.  Aggregate queries o Create one line in the result table. OR o Create multiple groups in the result table.  Parameter queries o Type of query that prompts the user for input before it runs. The query then uses the input as criteria that control your results. Example: City Parameter query in Panorama database.

 Referred to as “joining” tables.  Can produce confusing results.  Very dependent on a well-designed database. The tables must be related with appropriate foreign keys or the tables cannot be joined correctly for queries.

 Computers require very explicit instructions.  Used in criteria to specify what records to include in the query.  Normally, must be very explicit about relational operators on the conditions of queries. o =, >, =, <= o Like o Between o In – Define a condition with a list of two or more values for a field o Is  Wildcard is an asterisk.

 You use the logical operators to combine two Boolean values and return a true, false, or null result. Logical operators are also referred to as Boolean operators.  And: Returns True when Expr1 and Expr2 are true. o Example: InvoiceAmt >$500 And City = Lansing  Or: Returns True when either Expr1 or Expr2 are true. o Example: InvoiceAmt > $500 OR City = Lansing  Not: Returns True when Expr is not true. o Example: Not In ("holland","rockford","saugatuck")

 Can do calculations for a column based on the data in other columns for that same row.  Can use mathematical operators.  Can use pre-written functions in MS Access. Many different types of pre-written functions for date handling, data type conversion, calculations, etc. o See the pre-written functions in the expression builder.  Can be very simple to very complicated.

 To perform a calculation, you define an expression containing a combination of database fields, constants, and operators o Expression Builder is an Access tool that makes it easy for you to create an expression  In the Query Setup group on the Design tab, click the Builder button  Use the expression elements and common operators to build the expression, or type the expression directly in the expression box  Click the OK button 13

 You can specify a particular format for a calculated field, just as you can for any field, by modifying its properties 14

 The & (ampersand) operator is a concatenation operator that joins text expressions  The IsNull function tests a field value or an expression for a null value; if the field value or expression is null, the result is true; otherwise, the result is false 15

 Aggregate functions are used to create grouped output.  Common summary calculations have pre-written functions: o Sum, count o Max, min o Avg, stDev, var o First, last  Calculations can be done for all data in the result table or to create grouped output in the result table.  The Group By operator divides the selected records into groups based on the values in the specified field

 The IIf (Immediate If) function assigns one value to a calculated field or control if a condition is true, and a second value if the condition is false.

 Frequently want to see if something is TRUE or FALSE.  Example: If a training event has > $500 in expenses, then it is a high expense event.  Logical condition for Access: o IIF(ProductCost > ProductPrice, “Losing Money”) o IIF(ISNULL(trainingexpenses + travelexpenses), 0) o IIF(ISNULL(trainingexpenses + travelexpenses), 0, trainingexpenses + travelexpenses)

 5 minutes.  Turn to the person or people next to you.  Describe at least 3 queries that would be relevant to the order database we use for the Access project. o Make sure that one of the queries requires calculations.