Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

U U N IT

6
Extracting Information from
a Relational Database Using
Queries

Source:http://tinyurl.com/zsm25z6

Overview

Successful businesses may process hundreds, thousands or even millions of


transactions every day. Businesses utilising Information Technology typically opt to
organise and store records of these transactions within software Databases such as
Microsoft Access. Unit 4 introduced you to the concept of databases and gave you the
opportunity to explore software to organise and store business data as records within
tables using Microsoft Access Database. Unit 5 expanded upon the application of
Unit 4 concepts and focused on developing and refining your skills in creating tables,
creating relationships and adding and editing records within a table. This unit expands
on the concepts covered, by teaching you how to interrogate this vast repository of
data to extract and present meaningful information in a manner suitable to a business
stakeholder’s needs. This unit will introduce you to the concept of Database Queries
and Reports and develop your skill in creating and using Select Queries within business
management contexts. Throughout the unit you will be expected to participate in a

194  MGMT2005 Computer Applications for Business – UNIT 6


series of tutorials and hands-on exercises covering the steps to create and run simple
single and multi-table Queries and Reports.

Unit 6 Learning Objectives

By the end of this unit you will be able to:

1. Explain the purpose and use of Database Queries;

2. Create single-table and multi-table Select Queries;

3. Run a Query;

4. Define Query selection criteria;

5. Outline the use of calculated fields, parameter queries and aggregate functions;

6. Create queries involving calculated fields, aggregate functions and parameters;

7. Configure join types;

8. Create a basic report;

9. Conceptualise database solutions best suited to meet the needs of an audience;

10. Use database tools to solve a problem or satisfy a business need.

This unit comprises four sessions as follows:

Session 6.1: Creating and Running a Query

Session 6.2: Defining Selection Criteria for Queries

Session 6.3: Creating and Using Advanced Queries

Session 6.4: Creating and Using Reports

Readings and Resources

Required Resource

Miller, Lisa. (2008). MIS Cases: Decision making with application software (3rd
Edition). Pearson Education Inc., Upper Saddle River, New Jersey

Highly Recommended Resources

Benson, D. V., & Davis, K. (2008). Business information management. Retrieved


from http://tinyurl.com/gpme8v9

MGMT2005 Computer Applications for Business – UNIT 6  195


Benson, D. V., & Davis, K. (2013). Business information management: Exercises -
Solutions to hands on exercises. Retrieved from http://tinyurl.com/j4ebas7

Bourgeois, D. (2014). Information systems for business and beyond. Retrieved


from http://open.umn.edu/opentextbooks/BookDetail.aspx?bookId=189

GCF Global. (2015). Access 2010. GCFLearnFree.org. Retrieved from:


http://www.gcflearnfree.org/access2010

GCF Global. (2015). Access 2013. GCFLearnFree.org. Retrieved from:


http://www.gcflearnfree.org/access2013

Gallaugher, J. (2015).  Information systems: A manager’s guide to harnessing


technology. Retrieved from http://open.umn.edu/opentextbooks/BookDetail.
aspx?bookId=16

Additional Resources
Donalds, C. and Henry, J. (2011). Solving managerial problems with spreadsheets
and databases

196  MGMT2005 Computer Applications for Business – UNIT 6


SSession 6.1

Creating and Running a Query

Introduction
Software Databases are able to store millions of transactional and other records on
behalf of a business. The voluminous nature of this raw data makes it difficult to
use when making many operational, tactical and strategic decisions. For such data to
become effective and good information it must be concise and relevant. Queries allow
you to extract relevant information from available data. This session will show you
how to create, configure and run your own simple custom queries in order to satisfy
specific informational needs.

Query
A Query is essentially a request made by you to interact with the records stored within
the tables of a Database Solution. This interaction could be in the form of a request
to retrieve information, to add, change or delete records or some other action on the
data/records stored within a Database.

You should consider using Queries whenever you wish to extract, add, change, or
delete records from your database. Queries can perform their configured tasks on
individual records, subsets of a table or tables, entire tables or even multiple tables at
a time.

Once a query is built it must be executed or “run”; this essentially means that the
request is submitted to the Database software and, provided that the query is valid,
the software fulfils the request by completing the tasks and providing the user with
the results of the Query. These results may be used as the source of data for a Report.

Creating a Query
A Query may be created using one of the following options:

• The Query Wizard

• Design View

• SQL View

MGMT2005 Computer Applications for Business – UNIT 6  197


The Query Wizard
This is the quickest and easiest way currently provided for building a query. The
Query Wizard is accessible via the “Create” tab of Microsoft Access. Once triggered
the Query Wizard presents the user with a series of questions with accompanying
options. The user selects options and progresses to the next question within the series.

Figure 6.1: New Query Wizard Dialog Figure 6.2: Simple Query Wizard Dialog
Box

Each question/response step configures a part of the final Query. Once complete the
Query may be modified and/or executed. While this is the simplest approach it gives
the user the least control over the Query configuration.

Design View
This is the most common approach to building and configuring a Query. This approach
strikes a good balance between ease-of-use for the average not-extremely-technical
user and granular control over the configuration of the Query. It provides a graphical
user’s interface that allows users to easily create, configure and modify a Query. As
such this approach is ideal for business management professionals and will be the
approach used throughout this unit.

SQL View
This approach allows users to build and configure a Query using the actual
programming query commands natively understood by Database software. Though
not extremely difficult, this approach requires more technical skill than the first two
approaches. What this technique loses with respect to ease-of-use it makes up for in
the level of control afforded to the user when configuring the Query. The first two
approaches would automatically generate these Query commands based on the options
chosen. This approach requires you to write them yourself. This topic is explored in
significantly more detail within the following recommended texts.

198  MGMT2005 Computer Applications for Business – UNIT 6


Readings

Benson, D. V., & Davis, K. (2008). Business information management. Retrieved


from http://tinyurl.com/gpme8v9

Benson, D. V., & Davis, K. (2013). Business information management: Exercises -


Solutions to hands on exercises. Retrieved from http://tinyurl.com/j4ebas7

SELECT Query
SELECT Queries are those used to retrieve, extract, synthesise and compile information
from the myriad of tables and records found within a given Database solution. These
queries do not change, delete or update records stored within the database. You must
create a single-table query whenever you need to retrieve some portion of the data/
fields and/or subset of the records of a single table. You must create a multi-table
Query whenever you need to retrieve data items/fields from records scattered across
multiple tables. These types of queries are explored in further detail in upcoming
activities.

ACTIVITY 6.1
SELECT Query: Single-Table (20 minutes)

Instructions:

Task A: Using the links provided, view the video tutorial on building
single-table SELECT Queries.

For Microsoft Access 2010 users:


GCFLearnFree.org. (2011, March 25). Access 2010: Simple Query [Video
file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=Mw0Ssxsv3TI - Approx. 5 mins


For Microsoft Access 2013 users:

GCFLearnFree.org. (2014, February 3). Access 2013: Designing a


Simple Query [Video file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=4bn58rlwKUc - Approx. 5 mins

MGMT2005 Computer Applications for Business – UNIT 6  199


ACTIVITY 6.1 Cont’d
Task B: A sample database based on Database Tutorial case study
found in your course text (see below) has been prepared and uploaded to
the course page for your use:

●● Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey

Download the Unit 8 copy of the Salon Database (available on the course
page) and examine the tables found within (both structure and content).
Using the Salon Database you are to:

●● Create a query named qryCustomerContactList to retrieve the first


name, last name and phone number for all customers. Once created
you are to run the query and view the results.

Optional

Modify the query so that it only returns the records for persons living in
the 94115 zip code. Once modified you are to run the updated query and
view the results.

Note: A link to the Learning Activity 6.1 Task B video solution will be
provided on the course page.

ACTIVITY 6.2
SELECT Query: Multiple Tables (20 minutes)
Instructions:
Task A: Using the links provided, view Part 1 and Part 2 of the video
tutorial on building Multi-Table SELECT Queries.

For Microsoft Access 2010 users:


Part 1
GCFLearnFree.org. (2011, April 8). Access 2010: Multi-Table Queries, Part
1 [Video file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=mDGhwnOH1MA - Approx. 5 mins

200  MGMT2005 Computer Applications for Business – UNIT 6


ACTIVITY 6.2 Cont’d
Part 2
GCFLearnFree.org. (2011, April 8). Access 2010: Multi-Table Queries, Part
2 [Video file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=qaJ97zIqmNw - Approx. 4 mins


For Microsoft Access 2013 users:
Part 1
GCFLearnFree.org. (2014, February 3). Access 2013: Multi-Table Queries
(Part 1) [Video file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=kScTSafLLbo - Approx. 5 mins


Part 2
GCFLearnFree.org. (2014, February 3). Access 2013: Multi-Table Queries
(Part 2) [Video file]. Retrieved June 2016, from

uu http://www.youtube.com/watch?v=NJLQRUDlJJk - Approx. 3 mins


Task B: The staff of Timeka’s Tanning Salon, Inc. needs to view the
details of the current customer enrolments. Using the Unit 8 copy of the
Salon Database (available on the course page) you are to:

Create a query named qryEnrolmentDetails to retrieve the first name, last


name, IType and enrolment descriptions for all customers. Once created
you are to run the query and view the results.

Note: A link to the Learning Activity 6.2 Task B video solution will be
provided on the course page.

Session 6.1 Summary

In Session 6.1 we learnt the purpose and usage of database Queries, explored how
to create and configure SELECT Queries and considered how the results of such a
Query may be used to fulfil some business need. The knowledge and skill developed
in this unit will enable you to create and use your own custom queries to support
future decision-making. The next session will further refine your knowledge and skills
in creating, configuring and using SELECT Queries to better address a stakeholder’s
informational needs.

MGMT2005 Computer Applications for Business – UNIT 6  201


SSession 6.2

Defining Selection Criteria for Queries

Introduction
Database users must be able to specify what records should be returned and what
records should be ignored by Queries to provide the information required to support
management decisions. Query criteria allow users to specify these details. This session
will show you how to modify Queries to be more effective by teaching you how to
define Query criteria and configure Query sort option.

Modify a Query
As demonstrated in Session 6.1, when you open an existing Query it is automatically
run and its query results are displayed within something similar to a table. This is
referred to as the Datasheet view of the Query. To modify your query you must first
switch to the Design view, the view you use when creating or editing Queries. The
following section describes two ways to switch to the Design view.

1. Locate the Query you would like to edit. Right-click on the Query. Click Design
view.

2. Locate the Query you would like to edit. Run the Query. Move to the Home tab
of the Ribbon, click the View button to make the View drop-down menu visible,
select Design View.

202  MGMT2005 Computer Applications for Business – UNIT 6


Sorting Queries

ACTIVITY 6.3
Sorting Queries (20 minutes)

Instructions:
Visit the webpage via the appropriate link (provided below) to learn how to
sort a Query.

For Microsoft Access 2010 users:


GCFLearnFree.org. (2015, February 19). Access 2010: More Query
Design Options. Retrieved June 2016, from

uu http://www.gcflearnfree.org/access2010/more-query-design-options/3/
For Microsoft Access 2013 users:
GCFLearnFree.org. (2015, October 7). Access 2013: More Query Design
Options. Retrieved June 2016, from

uu http://www.gcflearnfree.org/access2013/more-query-design-options/2/

MGMT2005 Computer Applications for Business – UNIT 6  203


Defining Criteria

ACTIVITY 6.4
Defining Criteria (20 minutes)
Instructions:

Task A:
Using the links provided, view Parts 1 to 3 of the video tutorial on
demonstrating how to define and use Query criteria. You are encouraged
to make your own notes.

Part 1
Office Videos. (2013, June 11). Training: Use query criteria in Access 2013:
The basics tutorial - Video 1 of 4 [Video file].Retrieved June 2016, from

uu http://www.youtube.com/watch?v=VjQ_jVHGaGQ - Approx. 3 mins


Part 2
Office Videos. (2013, June 11). Training: Use query criteria in Access
2013: Using AND and OR with multiple criteria - Video 2 of 4 [Video file].
Retrieved June 2016, from

uu http://www.youtube.com/watch?v=eFPU9gyZYtw - Approx. 3 mins


Part 3
Office Videos. (2013, June 11). Training: Use query criteria in Access 2013:
Using NOT, IN, LIKE, BETWEEN - Video 3 of 4 [Video file].Retrieved June
2016, from

uu http://www.youtube.com/watch?v=AT9vs5ksF3I

204  MGMT2005 Computer Applications for Business – UNIT 6


ACTIVITY 6.5
Create Custom Queries (20 minutes)
Instructions:

Task A:
The staff of Timeka’s Tanning Salon, Inc. needs you to build a number
of queries to support its operations. Using the Unit 8 copy of the Salon
Database (available on the course page) engage in the activities below:

1. In a bid to increase revenue the manager of Timeka’s intends to contact all


persons enrolled in the “One Session” plan to offer them a 5% enrolment
discount to encourage their enrolment in the longer term options.
You are to create a Query named qrySingleSession to provide the
manager with the information needed. The query must retrieve the first
name, last name, and phone number of all customers enrolled in the
“One Session” plan. Results should be sorted in ascending order on the
last name column. Once created you are to run the Query and view the
results.

2. The owner and founder of Timeka’s wishes to celebrate the anniversary


of the Salon’s opening by giving gifts to all customers who enrolled for
“One Month Unlimited” plans between 1/13/2006 and 1/16/2006 inclusive.
You are to create a Query named qryAnniversaryWinners to provide the
owner with the information needed. Your Query should retrieve the first
name, last name, address and phone number, enrolment date and plan
details of all customers meeting the criteria. Once created you are to run
the Query and view the results.

3. An existing customer contacted the manager to make an inquiry. The


manager has gathered the information requested by the customer but
cannot find the name and contact details of the customer. The manager
vaguely remembers that the person’s address contained the word
“glacier”. Create a query to retrieve the first name, last name, address
and phone number of all customers with the word “glacier” within their
address. Be sure to use wildcards where appropriate. Once created you
are to run the query and view the results. Since this is a temporary Query
there is no need to save it.
Note: A link to the Learning Activity 6.5 video solution will be provided via
the course page

MGMT2005 Computer Applications for Business – UNIT 6  205


Session 6.2 Summary

In Session 6.2 we learned how to define the criteria of a Query and how such may be
useful when attempting to retrieve information using Queries. This will allow you
to refine Queries to provide the right information needed to support a management
decision. The upcoming session will introduce you to Database Reports and
demonstrate how to use the results of a Query as the source of data for a management
report.

206  MGMT2005 Computer Applications for Business – UNIT 6


SSession 6.3

Creating and using Advanced Queries

Introduction
In earlier sessions we learnt how to create and configure simple Queries to support
management decision making needs. Though useful, these initial Queries only allowed
a user to retrieve information from one or more tables (possibly based upon some
fixed criteria(s) specified at the time the Query was created).

In the real world, business stakeholders typically require more flexible and powerful
ways of extracting and producing meaningful information. Business stakeholders often
find it necessary to 1) perform calculations on fields/data items found across different
tables of a database, 2) configure variable criteria values at Query run time and 3)
utilise aggregate Functions to derive summary information from a group of records.
Database Software like Microsoft Access provides Managers with the ability to create
more advanced Queries to address these complex informational requirements.

This session will introduce you to the Advanced Query options. It will first show you
how to create and use calculated fields within a Query so that you may be able to
derive or produce information based upon some business rules. Next, it will introduce
you to a more flexible type of Query known as the Parameter Queries. These types
of Queries should be used whenever you wish to derive specific information using
variable criteria values at Query run time, i.e. values that may change each time we
wish to run the Query. Throughout the learning activities found within this session
you will learn how to create and use these Parameter Queries. Finally, you will explore
options to enhance the utility of Queries through the use of Aggregate Functions.
Aggregate Functions allow users to derive summary information from a group
of records. Aggregate or summary information, such as sums, averages, minimum
and maximum values, are usually quite useful to management stakeholders. Where
individual records provide a detailed view useful for many operational decisions,
a management user may find aggregate information, derived from these individual
records, to be more usable when they attempt to make decisions of a more tactical or
strategic nature.

Let us now begin with a learning activity.

MGMT2005 Computer Applications for Business – UNIT 6  207


Creating and using Calculated Fields

ACTIVITY 6.6
Calculated Field (20 minutes)
Instructions:

Task A:
Proceed to the Database Glossary section of your course text (see below):

Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Read the Calculated Field discussion and example found on pages 359-
360 and post responses to the following in the Unit forum:

Task B:
Watch the video tutorial and example on creating Queries with Calculated
Fields at the link below.

Microsoft Access Tutorials and Training. (2010, November 12). Adding a


calculated field to your query [Video file]. Retrieved from:

uu https://www.youtube.com/watch?v=pAnfjCu0c-Q - Approx. 3 mins

FOOD FOR THOUGHT


Calculated fields may also be created and added to Tables with benefits
similar to those described for calculated fields within Queries; that is, they
let you perform calculations using your table data. There are, however,
limitations of this approach over calculated fields within Queries. The
main limitation is that calculated fields added to a given table only allow
calculations to be performed on data found within that table. Calculations
cannot include fields from other tables or queries..

208  MGMT2005 Computer Applications for Business – UNIT 6


ACTIVITY 6.7
Calculated Field in a table (20 minutes)
Instructions:

Visit the webpage via the appropriate link (provided below) to learn more
about Calculated Fields within Tables.
For Microsoft Access 2010 users:
GCFLearnFree.org. (2015, February 19). Access 2010: Tables: How to
Create Calculated Fields and Totals Rows. Retrieved from:

uu http://www.gcflearnfree.org/access2010/tables-how-to-create-
calculated-fields-and-totals-rows/1/

For Microsoft Access 2013 users:


GCFLearnFree.org. (2015, October 7). Access 2013: Creating Calculated
Fields and Totals Rows. Retrieved from:

uu http://www.gcflearnfree.org/access2013/creating-calculated-fields-
and-totals-rows/1/

The Learning Activity below gives you the opportunity to practice what you have
learnt throughout this Session.

MGMT2005 Computer Applications for Business – UNIT 6  209


ACTIVITY 6.8
Creating Queries with Calculated fields (15 minutes)
Instructions:

Begin this Learning Activity by reviewing the details of Case 15: Granny
Joan’s Cookies found in your course text (see below):

Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey

Note, a partially completed solution for this case has been prepared and
uploaded to the course page for your use in this Learning Activity. Download
the Unit 10 copy of the Granny Joan’s Cookies Database (available on the
course page ) and examine the tables found within (both structure and
content).

Mr. Neely, the superintendent of the Fillmore school system in charge of


overseeing cookie sales, needs to view the price listing for Granny Joan’s
Cookies.

Create a Query called qryCookieSellingPrice that retrieves and displays, in


alphabetical order, the cookie package name, identification number, cost
price for each cookie package available along with the calculated fields of
selling price and gross income.

You are to follow the business rules defined within the case scenario
narrative to determine the formula for the selling price calculated field.
Note that gross income = selling price – cost price.

When you are finished you are to run the Query to derive the result.

Creating and using Parameter Queries


In earlier sessions we learnt how to create and configure Queries to derive information
to suit our needs. In these sessions we configured the values needed for the specified
criteria at the time we created the Query. For example, if we wanted to determine the
sales made by an employee Jane with an EmployeeID of 0005 we would specify this
ID within the Query criteria area of the EmployeeID column within our Query Design
View. There are times, however, when such an approach is not the most appropriate.

210  MGMT2005 Computer Applications for Business – UNIT 6


In the example described above we would have designed and built this Query to
only retrieve Jane’s information. Should we later wish to retrieve the sales data for
another employee, perhaps John with EmployeeID of 0007, we would be required
to either create an entirely new Query or edit an existing one. This would occur for
every employee that we wish to derive this information about. In such situations a
Parameter Query may have been the more appropriate option.

Parameter Queries should be used whenever we wish to derive specific information


using variable criteria values at Query run time, i.e. values that may change each time
we wish to run the Query. This section will show you how to create Parameter Queries
to derive information based on your specific interests at the time of need.

Create a Parameter Query


Learning Activity 6.9 below provides information on how you would go about creating
a Parameter Query.

ACTIVITY 6.9
How to Create a Parameter Query (20 minutes)
Instructions:

Visit the webpage via the appropriate link (provided below) to learn how to
create and use a Parameter Query.

For Microsoft Access 2010 users:

GCFLearnFree.org. (2015, February 19). Access 2010: Queries: How to


Create a Parameter Query. Retrieved from:

uu http://www.gcflearnfree.org/access2010/queries-how-to-create-a-
parameter-query/1/

For Microsoft Access 2013 users:


GCFLearnFree.org. (2015, October 7). Access 2013: Creating a Parameter
Query. Retrieved from:

uu http://www.gcflearnfree.org/access2013/creating-a-parameter-
query/1/

MGMT2005 Computer Applications for Business – UNIT 6  211


ACTIVITY 6.10
Creating a Parameter Query (15 minutes)
Instructions:

This Learning Activity gives you the opportunity to practice what you have
learnt throughout this Session.
Begin this Learning Activity by reviewing the details of Case 15: Granny
Joan’s Cookies found in your course text (see below):
Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Note, a partially completed solution for this case has been prepared
and uploaded to the course page for your use in this Learning Activity.
Download the copy of the Granny Joan’s Cookies Database (available on
the course page ) and examine the tables found within (both structure and
content).
To better manage the tracking and reconciliation of sales and income the
administrative assistant, Ms. Kelly, needs a quick and easy way to retrieve
the list of student sellers within a given grade.
You are to create a Parameter Query called qryStudentsInGrade. The
Query must prompt the user to enter a parameter for the student grade.
The Query will then retrieve the details of the student sellers within the
grade provided. Details to be displayed within the result set include the
fields SellerID, SellerFirstName, SellerLastName and Grade. When you
are finished you are to run the Query to derive the result and answer the
Knowledge Check following this Learning Activity.

212  MGMT2005 Computer Applications for Business – UNIT 6


Knowledge Check
Based on the Parameter Query, qryStudentsInGrade, how
many students are in grade 7?

Answer to Knowledge Check


There are ten students found in Grade 7.

Figure 6.3: Results of Query - qryStudentsInGrade

Using Aggregate Functions in a Query


This section will show you how to enhance the utility of Queries through the use of
Aggregate Functions. Aggregate Functions allow users to derive summary information
from a group of records. Aggregate or summary information, such as sums, averages,
minimum and maximum values, are usually quite useful to management stakeholders.
Where individual records provide a granular view useful for many operational
decisions, a management user may find aggregate information, derived from these
individual records, to be more usable when they attempt to make decisions of a more
tactical or strategic nature.

MGMT2005 Computer Applications for Business – UNIT 6  213


ACTIVITY 6.11
Aggregate Functions (20 minutes)
Instructions:

Task A:
Proceed to the Database Glossary section of your course text (see below):
Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Read the Aggregate Function definition and example found on page
354. From the definition and the example you should have an idea of the
potential usefulness of incorporating these functions within Queries.
As you proceed to Task B you are to consider how the available aggregate
functions (including COUNT, SUM, AVG, MIN and MAX) may be used to
support management decisions. Note, a Query that makes use of the
SUM aggregate function may sometimes be referred to as a Totals Query.

Task B:
Visit the webpages via the appropriate links (provided below) to learn more
about using aggregate functions within Queries.
For Microsoft Access 2010 users:

Part 1
GCFLearnFree.org. (2015, February 19). Access 2010: More Query
Design Options. Retrieved from:

uu http://www.gcflearnfree.org/access2010/more-query-design-options/5/
Part 2
GCFLearnFree.org. (2015, February 19). Access 2010: More Query
Design Options. Retrieved from:

uu http://www.gcflearnfree.org/access2010/more-query-design-options/6/

214  MGMT2005 Computer Applications for Business – UNIT 6


ACTIVITY 6.11 Cont’d
For Microsoft Access 2013 users:

Part 1
GCFLearnFree.org. (2015, October 7). Access 2013: More Query Design
Options. Retrieved, from:

uu http://www.gcflearnfree.org/access2013/more-query-design-options/4/
Part 2
GCFLearnFree.org. (2015, October 7). Access 2013: More Query Design
Options. Retrieved from:

uu http://www.gcflearnfree.org/access2013/more-query-design-options/5/
Task C:
Watch the video tutorial and example on creating Queries with Calculated
Fields and Aggregate Functions at the link below.
Phillips, R. (2012, April 26). Create Queries with Calculated Fields and
Aggregate Functions [Video file]. Retrieved from:

uu https://www.youtube.com/watch?v=uZjRkRE2Xm0 - Approx. 9 mins

The Learning Activity below provides the opportunity to practice what you have
learnt in the earlier parts of this Session.

MGMT2005 Computer Applications for Business – UNIT 6  215


ACTIVITY 6.12
Putting it all together (25 minutes)
Instructions:
Begin this Learning Activity by reviewing the details of Case 15: Granny
Joan’s Cookies found in your course text (see below):
Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Note, a partially completed solution for this case has been prepared and
uploaded to the course page for your use in this Learning Activity. Download
the Unit 10 copy of the Granny Joan’s Cookies Database (available on
the course page ) and examine the tables found within (both structure
and content). Alternatively you are free to use the copy downloaded and
modified for this session.
Mr. Neely, the superintendent of the Fillmore school system in charge of
overseeing cookie sales, intends to begin making preparations for the
next sales cycle. He hopes to focus on driving profits and turnover by
examining past sales trends.
To better assist Mr. Neely in planning for the next period of sales he needs
answers to a number of questions. You are to create appropriately named
Queries to provide Mr. Neely with the answers to the questions listed below
(note these questions may also be found on page 112 of your course text):

1. Based on gross sales, which grade has sold the most cookies? Identify
grade level and the collected income.

2. Based on gross sales, which student has sold the most cookies?

3. Based on gross income, what is the most popular cookie?

4. Which student has sold all the cookies that they have checked out?

Changing Join Types in a query


In earlier sessions we learnt how to perform multi-table queries and we introduced
the concept of Joins. Being aware of the different types of joins that exist and the
appropriate time to use each type is a critical skill as a query built using an incorrect
join type may produce information that is inaccurate and unreliable. This section
which consists of the learning activity below, will review the types of joins that exist,
demonstrate how to change them and will help you to develop an understanding of
how each join type affects the result set of a query.

216  MGMT2005 Computer Applications for Business – UNIT 6


ACTIVITY 6.13
Joins (25 minutes)
Instructions:
Task A
Using the help facility of your Microsoft Access software (or any related
online help facility provided by the Microsoft Corporation), locate and
review the guidance provided on LEFT JOIN, RIGHT JOIN Operations.

Task B
Using the links provided you are to complete the online tutorial on building
Designing Multi-Table Queries. This tutorial should help to clarify what you
learnt in Task A above. Be sure to attempt the challenge found at the end
of the tutorial.
GCFLearnFree.org. (2015, October 7). Access 2013: Designing a Multi-
Table Query. Retrieved from:

uu http://www.gcflearnfree.org/access2013/designing-a-multitable-
query/1/

Task C
Watch the video tutorial and example on Basic Joins in Access found at
the link below. This should give you a practical appreciation for what you
learnt within Task A and Task B above.
Phillips, R. (2013, June 5). Basic Joins in Access Queries [Video file].
Retrieved from:

uu https://www.youtube.com/watch?v=IsHZLrDtMlI - Approx. 6 mins

Session 6.3 Summary

In this session we explored the configuration and application of more Advanced


Queries and Query configurations. We learnt how to create and use Parameter
Queries, calculated fields and aggregate functions. We also reviewed and built upon
our knowledge of Joins and the impact that changing a Join type within a Query has
on the result set. With this knowledge you should now be able to design Queries to
address both the simple and complex informational needs of a wide variety of business
management stakeholders.

MGMT2005 Computer Applications for Business – UNIT 6  217


SSession 6.4

Creating and using Reports

Introduction
Tables and Queries provide users with an easy-to-use mechanism for perusing the
data and information in a Database while they are physically in front of a PC. These
mechanisms fall short however when attempting to prepare printed copies of this
data and information to use or share with persons while away from a PC. Reports are
database objects, similar to Tables and Queries, specifically designed to address the
limitations discussed. Reports provide the flexibility to format, group and summarise
information in a professional manner more suitable for printing and distribution to
management stakeholders. In this session we will learn how to create Reports using
the contents of a Table or the results of a Query as the data source.

Creating a One-Click Report


Microsoft Access provides a number of ways of creating a Report. The simplest way
to create a report is to first select the Table or Query in the navigation pane that you
would like the Report to be based upon. Once the Table is selected you are to click
on the Create tab, proceed to the Reports group and click on the Report button. The
Report will be automatically generated. You may print and save the Report as needed.

Figure 6.4: Reports Group

218  MGMT2005 Computer Applications for Business – UNIT 6


Using a Report
Once you have created a report you have the option of saving, printing, previewing
or exporting it. View the video tutorials in the Learning Activity below to learn more
about how to create, save, print, preview and export Reports, as well as how to perform
basic edits.

ACTIVITY 6.14
Create, save, modify, print and export a Report (10 minutes)
Instructions:
Visit the webpage via the appropriate link (provided below) to learn how to
create, modify and print a Report.
For Microsoft Access 2010 users:
GCFLearnFree.org. (2015, February 19). Access 2010: Creating Reports.
Retrieved June 2016, from

uu http://www.gcflearnfree.org/access2010/creating-reports/1/
For Microsoft Access 2013 users:
GCFLearnFree.org. (2015, October 7). Access 2013: Creating Reports.
Retrieved June 2016, from

uu http://www.gcflearnfree.org/access2013/creating-reports/1/

MGMT2005 Computer Applications for Business – UNIT 6  219


ACTIVITY 6.15
Putting it all together (30 minutes)
Instructions:
This Learning Activity gives you the opportunity to practice what you have
learnt throughout this Unit.
Begin this Learning Activity by reviewing the details of Case 14: Susan’s
Special Sauces found in your course text (see below):
Miller, Lisa. (2008). MIS Cases: Decision making with application software
(3rd. Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Note, a partially completed solution for this case has been prepared and
uploaded to the course page for your use in this Learning Activity. Download
the Unit 8 copy of the Susan’s Special Sauces Database (available on the
course page ) and examine the tables found within (both structure and
content).
You are to follow the guidelines and requirements defined within the case
narrative to build the Queries and Reports required by Ms. Giovanni. You
are not required to build the Forms described within the case though you
are free to attempt it if you wish.

Session 6.4 Summary

In this session we reviewed creating and using reports to display information retrieved
from a Query. This helps you to use simple reports to present data and information in
a consistent and professional manner.

Unit 6 Summary

In this unit we examined how queries and criteria may be used to extract information
from the database and present said information in a form more suitable to business
stakeholders. These skills will enable you to be respond to the dynamic information
needs of business stakeholders and provide the information needed to support the
decision-making effort.

220  MGMT2005 Computer Applications for Business – UNIT 6


References
GCFLearnFree.org. (2015). Access 2010: Creating Reports. Retrieved from:
http://www.gcflearnfree.org/access2010/creating-reports/1/

GCFLearnFree.org. (2015). Access 2010: More Query Design Options. Retrieved


from: http://www.gcflearnfree.org/access2010/more-query-design-
options/3/

GCFLearnFree.org. (2015). Access 2013: Creating Reports. Retrieved from:


http://www.gcflearnfree.org/access2013/creating-reports/1/

GCFLearnFree.org. (2015). Access 2013: More Query Design Options. Retrieved


from: http://www.gcflearnfree.org/access2013/more-query-design-
options/2/

GCFLearnFree.org. (2014). Access 2013: Multi-Table Queries (Part 1). Retrieved


from: http://www.youtube.com/watch?v=kScTSafLLbo

GCFLearnFree.org. (2014). Access 2013: Multi-Table Queries (Part 2). Retrieved


from: http://www.youtube.com/watch?v=NJLQRUDlJJk

GCFLearnFree.org. (2014). Access 2013: Designing a Simple Query. Retrieved from:


http://www.youtube.com/watch?v=4bn58rlwKUc

GCFLearnFree.org. (2011). Access 2010: Multi-Table Queries, Part 1. Retrieved


from: http://www.youtube.com/watch?v=mDGhwnOH1MA

GCFLearnFree.org. (2011). Access 2010: Multi-Table Queries, Part 2. Retrieved


from: http://www.youtube.com/watch?v=qaJ97zIqmNw

GCFLearnFree.org. (2011). Access 2010: Simple Query. Retrieved from:


http://www.youtube.com/watch?v=Mw0Ssxsv3TI

Miller, Lisa. (2008). MIS Cases: Decision making with application software (3rd
Edition). Pearson Education Inc., Upper Saddle River, New Jersey
Office Videos. (2013). Training: Use query criteria in Access 2013: The basics tutorial
- Video 1 of 4. Retrieved from: http://www.youtube.com/watch?v=VjQ_
jVHGaGQ

Office Videos. (2013) Training: Use query criteria in Access 2013: Using AND and
OR with multiple criteria - Video 2 of 4. Retrieved from: http://www.youtube.
com/watch?v=eFPU9gyZYtw

Office Videos. (2013). Training: Use query criteria in Access 2013: Using NOT, IN,
LIKE, BETWEEN - Video 3 of 4. Retrieved from: http://www.youtube.com/
watch?v=AT9vs5ksF3I

MGMT2005 Computer Applications for Business – UNIT 6  221

You might also like