Database Queries.

Slides:



Advertisements
Similar presentations
Concepts of Database Management Seventh Edition
Advertisements

Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
Concepts of Database Management Sixth Edition
Microsoft Access 2010 Chapter 7 Using SQL.
Maintaining and Querying a Database Microsoft Access 2010.
DAY 16: ACCESS CHAPTER 2 Tazin Afrin October 10,
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
Application Software: Databases
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational.
You can use a query to view a subset of your data or to answer questions about your data. For example, if you want to view a list of student names and.
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.
Access Queries Office 2013/ Queries Most common type of Query is selection(projection) Specify sources for data retrieval table(s) and/or query(ies)
Database Queries. Queries Queries are questions used to retrieve information from a database. Contain criteria to specify the records and fields to be.
Microsoft Access 2010 Building and Using Queries.
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.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
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
Using Special Operators (LIKE and IN)
Database Systems Microsoft Access Practical #3 Queries Nos 215.
® Microsoft Office 2013 Access Maintaining and Querying a Database.
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.
Lecture Access – Queries. What’s a Query? A question you ask a database –ie: “Who are my Stockton customers?” –ie: “How much did Bob sell on the 14th?”
Filters, Queries and Reports. Filters Limit the data, creating a dataset, or partial view of the whole database Single use – filters do not save with.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
ACCESS PROJECT TWO. PROJECT ONE In project one you: -Created Tables -Created Forms -Created Reports In this project you will learn about queries. Databases.
Writing Simple Queries in Access
Access Maintaining and Querying a Database
Microsoft Access 2013 Bobby Wan.
Exploring Microsoft Office Access 2007
Microsoft Office Illustrated Introductory, Windows Vista Edition
Access Tutorial 3 Maintaining and Querying a Database
Access Chapter 2 Querying a Database.
Plug-In T7: Problem Solving Using Access 2007
Objectives Create an action query to create a table
Querying a Database Using the Select Query Window
GO! with Microsoft Office 2016
Larry Reaves October 9, 2013 Day 16: Access Chapter 2 Larry Reaves October 9, 2013.
Microsoft Office Illustrated Fundamentals
Exploring Microsoft Office Access
Access Maintaining and Querying a Database
Building and Using Queries
Exploring Microsoft Office Access 2007
Exploring Microsoft Office Access 2007
Exploring Microsoft Office Access 2007
Microsoft Office Access 2003
MODULE 7 Microsoft Access 2010
Creating and Modifying Queries
Tutorial 3 – Querying a Database
CIS16 Application Programming with Visual Basic
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Microsoft Office Access 2003
Lesson 3 Chapter 10.
Introduction to Access
Guidelines for Microsoft® Office 2013
Microsoft Office Illustrated Introductory, Windows XP Edition
Shelly Cashman: Microsoft Access 2016
Exploring Microsoft Office Access
Assignment 3 Querying and Maintaining a Database
Presentation transcript:

Database Queries

Queries Queries are questions used to retrieve information from a database. Contain criteria to specify the records and fields to be included in the query results. Can contain wild cards or logical operators to make more complex queries * and ? <, >, <=, >=, <>, =, AND, OR, etc… Named and saved so they can be run again at a later time.

Query Languages A query language such as SQL (Structured Query Language) provides a set of commands for locating and manipulating data LIST ALL FOR STATE = “KY” Not user friendly Query By Example is another query language Fill out a form that describes your query More friendly

Queries Queries allow us to ask questions about data Dataset resulting from querying table for only employees who are Sales Representatives Employees table Queries allow us to ask specific questions about the data and receive a record set back that answers our questions. This returned record set is called a dataset. Simply running a query does not change the actual table data. However, you may alter the data in a dataset and the changes will be reflected in the underlying table. Queries allow us to ask questions about data This record set that answers our question is called a dataset 4

Using Query Design View Tables pane Design pane Query Design view has two panes – the table pane and the design pane. Striking the F6 key will toggle you between panes. Query Design grid has two panes – the table pane and the design pane Striking the F6 key will toggle you between sections 5

Specifying Criteria in a Select Query Fields in design grid allow us to specify criteria for the dataset Field row – displays the field name Sort row – enables you to sort the dataset Show row – controls whether or not you see a field in the dataset Criteria row – determines the records that will be selected for display Parts of the Design Grid include: Field Row – displays the field name Sort row – enables you to sort the dataset Show Row – controls whether or not you see a field in the dataset Criteria row – determines the records that will be selected for display 6

Specifying Criteria – Currency and Operands Currency amount entered without dollar sign Greater than (>) operand Specify criteria with currency Without the dollar sign With or without the decimal point Use operands such as: Less than and greater than Equal to or not equal to Specify criteria with currency without the dollar sign and with or without the decimal point. Use operands such as less than, greater than, equal to or not equal to, in order to compare your criteria against data in the specified field. 7

Specifying Criteria – And and Or Or Criterion and resulting dataset And criterion and resulting dataset Use the OR criterion to find records that can match one or more conditions specified. Use the AND criterion to find records that must match all criteria specified. OR finds records that can match one or more conditions AND finds records that must match all criteria specified 8

Run a Query Run command Running, or executing, a query is done by clicking the Run command located by clicking the Design tab and accessing the Results group. Running, or executing, a query is done by clicking the Run command 9

Add a Total Row in a Query The total row can be added to the design grid by clicking the Totals Icon Totals Icon The total row can be added to the design grid by clicking the Totals Icon. Total row added to the query

Calculated Queries Will find averages, max, min, sum, std You usually work with one field, not more If you use 2 fields, you get multiple answers Add Totals row to query Open “Group By” menu Choose appropriate function Run query