Microsoft Access 3 Database Creation and Management.

Slides:



Advertisements
Similar presentations
Microsoft Access 2 Database Creation and Management.
Advertisements

Microsoft Access 3 Database Creation and Management.
Database Creation and Management
Microsoft Access 4 Database Creation and Management.
Tutorial 3 Queries and Table Relationships
Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Microsoft Access 3 Database Creation and Management.
Relationship and Query Assignment. Creating Relationship Assignment: Create a blank database (use any names you like) And then, import the three Excel.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
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.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Querying a Database Using the Select Query Window
Querying a Database Microsoft Office Access 2003.
QUERYING A DATABASE By: Dr.Ennis-Cole. OBJECTIVES: Learn how to use the Query window in Design view Create, run and Save queries Define a relationship.
Access Tutorial 3 Maintaining and Querying a Database
Database Creation and Management
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.
SESSION 5.1 In this session we will be exploring Pattern Match Queries List-Of-Values Queries, Non-Matching Values in Queries Both the “And” and the “OR”
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
Microsoft Access 2 Database Creation and Management.
Microsoft Access Intro Class 5 Working with Queries.
Queries. What is a query? A query is actually the name for any database manipulation operation. The most commonly used type is a select query, which is.
Microsoft Access Introduction. What Is a Database Suppose you are a school administrator. You need to have information about –Students –Faculty –Staff.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Microsoft ® Office Access ® 2007 Training Datasheets II: Sum, sort, filter, and find your data ICT Staff Development presents:
Database Queries. Queries Queries are questions used to retrieve information from a database. Contain criteria to specify the records and fields to be.
Analyzing Data For Effective Decision Making Chapter 3.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
Concepts of Database Management Seventh Edition
Database1 Database Creation and Management. About Database Development…. The course is not designed to train you as an IT specialist……. It is not about.
 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.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Querying a Database - A question or an inquiry (dictionary.com) - WHAT ARE WE ASKING QUESTIONS ABOUT? THE DATA - BY ASKING QUESTIONS OF THE DATA WE OBTAIN?
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.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
Filtering Data A filter is a set of restrictions you place on the records of an open datasheet or form to temporarily isolate a subset of the records.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
® Microsoft Office 2013 Access Maintaining and Querying a Database.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T7: Problem Solving Using Access 2007 Business Driven Technology.
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.
1 Access Lesson 3 Creating Queries. 2 Creating a Query with the Simple Query Wizard Query-- database object that lets you ask the database about the data.
Microsoft Access 4 Database Creation and Management.
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.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
DAY 18: MICROSOFT ACCESS – CHAPTER 3 CONTD. Akhila Kondai October 21, 2013.
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
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.
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.
Access Query Design. IT Fundamentals2 Access Query Design The Query design screen provides a mechanism for selecting specific data from datafile(s) by:
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Queries.
Access Chapter 2 Querying a Database.
Querying a Database Using the Select Query Window
Microsoft Office Access 2003
Tutorial 3 – Querying a Database
Microsoft Office Access 2003
Shelly Cashman: Microsoft Access 2016
New Perspectives on Microsoft
Presentation transcript:

Microsoft Access 3 Database Creation and Management

What is an Access query? You can create a query when you need ONLY certain portion of data from a table or tables (or existing queries). For example, you may only need to see customers who live in Bakersfield, CA. The response would be to display only the records whose state field matches with CA. Multiple tables or queries can be used. Restrictions can be applied (i.e., comparison operators) The design view is used to specify the fields and records you want to see. Use Restaurant 3 database

OrderNumCustomerNumPaidInvoiceAmtBillingDate No /15/2001 OrderNumProductCodeQty ProductCodeCoffeeNameWeight/SizePriceDecaf 2301Colombian Aged Crop1 lb pkg7.99 Billing Address Table Customer Table Order Table Order Detail Table Product Table CustomerNumCustomerNameStreetCityStateZipCodeOwnerNamePhoneFirstContact 000ChoiCOB 105CSUBCA93311Scott Choi534809/20/2001 CustomerNumBillingNameStreetCityStateZip 129Sandy Lookout Restaurant PO Box 2800GrandvilleMI49468

The Query Design view window Fields used in the query are selected from the field list and added to the design grid. You can run the query at any time by clicking the Run button.

Creating a Sample Query Kim Carpenter, the director of marketing at the Valle, wants a list of all restaurant customers so that her staff can call customers to check on their satisfaction with Valle coffee’s services and products. She wants to have only following fields; CustomerName, City, State, OwnerName, and Phone. Use restaurant 3 databasedatabase Save the query as First Customer List.

More about a Query When you use the query design window, you use Query By Example (QBE). Do not include any unnecessary tables or queries in Design View of the query. Otherwise, you have to deal with unexpected problems (i.e., duplication of same data). Always select field from primary table. CustomerNum: Customer vs. BillingAddress

Creating Queries using Multiple Tables Since there have been some major changes in the Restaurant database, Barbara wants to make sure that the database is reliable. In order to test the reliability of database query function, She wants you to generate a query. The query must include following fields: Order Number, Coffee Name, Quantity, Price, and Weight/Size. Save as Test Should select OrderNum from the Order table (primary table)

Querying and Sorting of multiple Tables Barbara wants to have followings for the upcoming quarterly report: CustomerName, City, State, BillingDate, InvoiceAmt, Paid, and First Contact. At same time, Barbara wants to sort the records by the InvoiceAmt field in ascending order. Save as Customer Orders

Wildcard: LIKE a* or LIKE *a Find between values: (NOT) BETWEEN AND Find exact match value: 1/10/2013 Expressions

Stating Query Condition And conditions stated on the “Criteria” line.

Applying Exact Condition Barbara would like to have a list of all orders billed on 01/15/2013. The list must include following fields; OrderNum, Paid, InvoiceAmt, BillingDate, CustomerName, State, OwnerName, and Phone Save as Jan Orders

Using Wildcard (Like a*) Barbara wants to know a list of all Customer Names that begins with M. The list must include following fields; Customer Name, Order Number, First Contact and Billing Date. In addition, the Order Number must be sorted in ascending order. Save as Customer Name Begins With M

Using Between ** and ** Barbara wants to know a list of all Product Code between 2465 and The list must include following fields; Product Code, Coffee Name and Price. There should a space between number and word Inclusive Save as Product Code Between 2465 And 2763

Using Greater than (>) Barbara wants to know those records whose InvoiceAmt exceeds $2,000. Generate a query using a query (Customer Orders query). The query must include only following fields; Customer Name, Invoice Amount, and Billing Date. Save as High Invoice Amounts

Using And and Or Operators The And condition. The Or condition.

Creating And and Or conditions in the design grid And conditions must be specified on the same line. Or conditions must be specified on different lines.

Using AND Leonard requested a list of orders billed on 01/15/2013 that are still unpaid. He wants to know which customers are slow in paying their invoices. Use the Customer Orders query again and make sure that this query includes following fields; CustomerName, Paid, BillingDate, and InvoiceAmt. 01/15/2013 AND unpaid (No) Save as Unpaid Jan Orders

Using OR Leonard wants to determine which restaurant customers are most valuable to Valle Coffee. Specifically, he wants to see a list of customers whose first contact date is earlier than 01/01/2004. OR who has been placed orders for greater than $2,000, so that he can call the customers personally and thank them for their business.

Using OR Make sure that this query includes following fields; CustomerName, InvoiceAmt, and First Contact. He also wants to have a sorted output in ascending order based on the customer name. If you want, you can use the Customer Orders query again Save as Top Customers

Performing Calculation Leonard is considering adding a 2% late charge to the unpaid invoices. He only wants to include following fields; Customer Name, Paid, Billing Date, and Invoice Amount. Set unpaid field to “No”

Performing Calculation And he wants to know exactly what these charges would be. He wants to create a new field “Late Charge” right after InvoiceAmt field and then use it to calculate late charge. Late charge formula: InvoiceAmt*0.02 Save as Unpaid With Late Charge

A calculated field in the query datasheet Expression Builder adds your calculated field to the query design grid. You can then assign it a name, which will display in query datasheet view when the query is run.

Use of “Build” Function

Using Aggregate Functions Barbara prepares a report of Valle coffee’s restaurant business for Leonard on a regular basis. The information in the report should include a summary of the restaurant invoice statistics: the total invoice amount for all orders, the average invoice amount, and the number of orders (same as number of invoice amount). She asks you to create these statistics.

Using Aggregate Functions Access has several Aggregate Functions that can be used to calculate various statistical information. Aggregate functions are specified in the Total row of the design grid. They can be assigned by clicking the Totals button on the Query Design toolbar.

Using Aggregate Functions She also wants you assign a new field as follows; Total of Invoices ( total invoice amount for all orders) Average of Invoices (average invoice amount) Number of Orders (number of invoice amount) Save as Invoice Statistics

Using Record Group Calculations Barbara’s another report to Leonard also includes the same invoice statistics (total, average, and count). Because Valle Coffee sends invoices to its customers each month (Jan invoice, Feb Invoice, and March invoice), each invoice has the same billing date. Barbara asks you to display the invoice statistics for each month (billing date). Grouping by each month

Using Record Group Calculations Calculate statistics for groups of records Average salary by the position Number of employees in each department Group By operator Divides the selected records into groups based on the values in the specified field Those records with the same value for the field are grouped together. Save as By Billing Date

Query Practice: Generating Queries Download a database: “Roadrunner” 1. I would like to have a query that includes following fields; Employee Number, Instructor Last Name, Instructor First Name, Course Name and Time. Save as Your Course Info. 2. I would like to have a query that ONLY includes the male members who live in Burbank using following fields; First Name, Last Name, Gender, City, and State. Save as Males in Burbank.

Query Practice: Generating QueriesGenerating Queries 3. I would like to know a list of all members whose last name begins with P using following fields; First Name, Last Name, City, and State. Save as Last Names begin with P.

Query Practice: Generating QueriesGenerating Queries 4. I would like to know ONLY the Employee Number, Instructor Last name, Instructor First name, and the Salary Amount for only those employees who make between $39,500 and $55,000. In addition, the resulting salaries must also be placed in order from high salary to low salaries. Save as Between Salaries.

Query Practice: Generating QueriesGenerating Queries 5. I would like to know the Class Number, Last Name, and Member Number for each member who has a class number greater than or equal to In addition, sort last names in ascending order. Save as Greater than or equal to 8900.

Query Practice: Generating QueriesGenerating Queries 6. I would like to know a list of all members whose last name that begins with A or a first name that begins with R including the following fields: First Name, Last Name, City, and State. Save as Names with A or R.

Query Practice: Generating QueriesGenerating Queries 7. I would like to know an instructor who teaches handball and students who are taking handball course. Following fields must be appear on the query: Instructor First Name, Instructor Last Name, Course Name, Member Last Name and Member First Name. In addition, the member last names should be sorted in alphabetical order. Save as Handball Listing

Query Practice: Generating QueriesGenerating Queries 8. I would like to know a whole list of the Instructor Last name, Instructor First name, and the Salary Amount. Since instructors have worked hard, I would like to increase their salary by 15%. So, I’d like to calculate 15% salary increase for each instructor. Save as Salaries Increase

Query Practice: Generating QueriesGenerating Queries 9. I would like to know the Sum, Average, Max. and Min. of employees salary (These four items must all appear in the same query). Save as Salary Calculations 10. I would like to know the Sum, Average, Max. and Min. of employees salary based on Employee Type. Save as Employee Type