INTRODUCTION TO QUERIES William Klingelsmith. Reminders MyITLab Lesson C due 10/22 Homework #4 (Nielson TV Problem) due 10/26 Last day to drop is also.

Slides:



Advertisements
Similar presentations
BASIC SKILLS AND TOOLS USING ACCESS
Advertisements

Your Tasks Create queries and reports that will meet the needs of the business. Reports should have a consistent house style. B. Explain any testing you.
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Access Tables William Klingelsmith. Exam Review/Reminders Grades were okay for the most part Common errors Incorrect references in formula Incorrect difference.
Access Lesson 2 Creating a Database
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Create Forms Lesson 5. Software Orientation Creating Forms A form is a database object –enter, edit, or display data from a table or query Providing.
Chapter 2 Querying a Database
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.
© 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 4 – Creating New.
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.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Working with a Database
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Microsoft Access 2010 Building and Using Queries.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T6: Basic Skills and Tools Using.
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.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
U:/msu/course/cse/103 Day 06, Slide 1 CSE students: Do not log in yet. Review Day 6 in your textbook. Think about.
Analyzing Data Using Access. Creating a new database To create a new database 1.Start Access. In the Task Pane, click Blank Database. 2.The File New Database.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
® Microsoft Office 2013 Access Creating a Database.
1 Database Systems Introduction to Microsoft Access Part 2.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
Maintaining a Database Access Project 3. 2 What is Database Maintenance ?  Maintaining a database means modifying the data to keep it up-to-date. This.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
Microsoft Access 2010 Chapter 3 Maintaining a Database.
ACCESS (CHAPTER 2-3 continued) Naman Kohli October 16,
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.
INTRODUCTION TO QUERIES William Klingelsmith. Reminders MyITLab Lesson C due 10/22 Homework #4 (Nielson TV Problem) due 10/26 Last day to drop is also.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
DAY 17: ACCESS CHAPTER 1-2 Rahul Kavi October 15,
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
Access Test Questions Test Date: 05/05/16. Chapter 1 (Lynda.com) Question 1 An access database uses five main components (database objects). Which is.
Access Tutorial 2 Building a Database and Defining Table Relationships
Microsoft Access 2013 Bobby Wan.
Objectives Query for top values Create a parameter query
Plug-In T7: Problem Solving Using Access 2007
CIS 155 Table Relationship
Larry Reaves October 9, 2013 Day 16: Access Chapter 2 Larry Reaves October 9, 2013.
Access Creating a Database
Microsoft Office Illustrated Fundamentals
Access Creating a Database
Access Maintaining and Querying a Database
Building and Using Queries
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Creating and Modifying Queries
Chapter 9 Lesson 2 Notes.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Forms & Reports William Klingelsmith.
Tutorial 9 Using Action Queries and Advanced Table Relationships
New Perspectives on Microsoft
Presentation transcript:

INTRODUCTION TO QUERIES William Klingelsmith

Reminders MyITLab Lesson C due 10/22 Homework #4 (Nielson TV Problem) due 10/26 Last day to drop is also 10/26 Midterm grades will be computed on HWK1-3 and Excel Exam

Database Updated The Music database we worked on last class has been augmented with several records Two new tables (Genres and Sales) need to be added to this database These tables and their records are stored in external files

Importing Data To import data from external sources, you will utilize the External Data tab in Access. There are many different import/export options, but today we will focus on XML file imports. “XML File” in the Import & Link subgroup on the External Data Tab

Importing Data After you choose your file, you will get this dialog. Most of the time for this class, the default ‘Structure and Data’ is appropriate.

Establish Relationships Now that we have all of our tables, we must link them together using relationships Albums -> Songs Albums -> Sales Use Referential Integrity What about the link between Genre and Albums?

Lookup Fields Lookup fields are special Data Types in tables. Possible choices for a field in one table are determined by existing entries in another table. They let you make a dropdown type box for a field which can aide in data entry efficiency. They will build a relationship between two tables automatically.

Lookup Fields Move to the design view of the Albums table Change the data type for the Genre field to Lookup Wizard Follow the wizard’s instructions to create the lookup field. When finished, the wizard should create a relationship between the Genre and Albums tables.

Queries Queries are used to view a subset of the data contained in your database These subsets are most commonly broken down by a limiting criteria “Return only the songs that are on albums by a particular artist” “List all albums of a certain genre” Think of QUEries as QUEstions!

Constructing a Query Let’s start our query lesson with a simple example We wish to list every Artist and Song name Where is this information stored?

Constructing a Query Move to the Create tab and choose Query Design The Show Table dialog lets you add relevant tables to your query Choose only Songs for this query

Constructing a Query Field: Name of the field Table: Table the field belongs to Sort: Sorting the results in Ascending/Descending order Show: Hide/Display the result in the query Criteria and Or: Allows you to narrow filter results of the query on some criteria

Running a Query Queries can be executed in two ways The Run button in the design view of a query Switching to the Datasheet view of a query

Adding Criteria Save the last query as Query A Duplicate it in the object pane Call the copy Query B Open the design view of Query B For this query, we wish to only return the songs performed by the artist ‘Venetian Snares’ In the criteria row under the Artist field type “Venetian Snares” Run the query

Criteria Notes Criteria across multiple fields on the same line are all used at once (AND) Multiple criteria under the same field are all acceptable choices (OR) Conditional operators (, =, etc) can be used in criteria Access has two wildcard operators (? And *)

Criteria Examples (OR) Duplicate Query B and call it Query C On the row below where “Venetian Snares” currently resides, type “Fleet Foxes” Notice that songs from both artists are now returned in the result Criteria is OR’d It is saying that results can be either from Venetian Snares OR Fleet Foxes

Criteria Examples (AND) Duplicate the last query and call it Query D Add the Favorite field from the Songs table to your query design Criteria should be as follows: Artist: Venetian Snares Favorite: Yes We have fewer results than before Criteria across multiple fields on the same row are AND’d “Songs must both be by Venetian Snares and a favorite to be included in the query”

Criteria Examples (Conditional Operators) Let’s try to get a list of all albums released before the year 2000 Create a new query and add the Songs and Albums tables Populate the query with the fields: Artist, SongName, AlbumName, Genre, ReleaseDate In the criteria under the release date enter: “<1/1/2000”

Criteria Examples (Wildcards) Wildcards are operators that can be substituted for a set of characters * Operator allows any set of characters of any length Let’s say we had a field that held first names. By using S* in the criteria, we could get these results from our query Sara Stephen Sue ? Operator allows any set of characters of length 1 By using ?ill we could get results such as: Will Bill Jill

Criteria Examples (Wildcards) Return only Albums that begin with the letter T