0% found this document useful (0 votes)
77 views

COSC 1701A, M, N, Computer Applications, W22, Assignment-3 Part-1v02

This document provides instructions for a database assignment involving an Access database for a coffee company. It includes tasks to build relationships between tables, import data from Excel, add new records, and create queries. Students are asked to complete the tasks, which involve verifying and inputting customer, order, and product data; adding new customers, products, and an issue report; and analyzing employee salary data through importing a table and creating queries for specific cities. The assignment is due by a specified date and must be submitted through the course management system.

Uploaded by

Prearit Jeitly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

COSC 1701A, M, N, Computer Applications, W22, Assignment-3 Part-1v02

This document provides instructions for a database assignment involving an Access database for a coffee company. It includes tasks to build relationships between tables, import data from Excel, add new records, and create queries. Students are asked to complete the tasks, which involve verifying and inputting customer, order, and product data; adding new customers, products, and an issue report; and analyzing employee salary data through importing a table and creating queries for specific cities. The assignment is due by a specified date and must be submitted through the course management system.

Uploaded by

Prearit Jeitly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

P1 Assignment-3: Introduction to Access, Relationships, and Queries

Due Date: March 20.

Instructions:
1. This is an individual homework. Each student must submit his/her solution
through the dropbox.
2. All submissions are to be via the Moodle Submission System; no other way of
submission is accepted.
3. All submissions must be submitted through the dropbox by the due date or by
the closure date, Closure Date allows 3 days for late submissions.

Purpose and Objective


The purpose of this assignment is to introduce you to building relationships and queries in
Access databases.

Success Criteria
- Successful utilization of the assigned features and tools.

Keywords
Access, ERD diagram, relationship, table, import data, SELECT query.

Readings
Access Chapter 1.
- Access Chapter 2.
- Moodle Week 8 Resources.

Assignment Submission, Format, and Documentation


- This is Part 1 of Assignment 3.
- You must submit your Access solution files.

P1 Assignment 3 Page 1 of 11 COSC 1701A/M/N W2022 Algoma University


1. Custom Coffee (Chapter 1, Textbook, Page 722) 25 marks

The Custom Coffee Company provides coffee, tea, and snacks to offices in Miami. Custom
Coffee also provides and maintains the equipment for brewing the beverages. To improve
customer service, the owner recently had an Access database created to keep track of
customers, orders, and products. This database will replace the Excel spreadsheets
currently maintained by the office manager. The company hired you to verify and input all
the Excel data into the Access database.

a. Open the a01p2Coffee file and save the database as a01p2Coffee_LastFirst.


Click Enable Content on the message bar.
b. Click the Database Tools tab and click Relationships in the Relationships group.
Review the table relationships. Notice the join line between the Customers and
Orders tables.
c. Click Close in the Relationships group.
d. Double-click the Sales Reps table to open it in Datasheet view. For rep number 2,
replace YourFirstName and YourLastName with your first and last names. For
example, as the Access author, I would type Eric in place of YourFirstName
and Cameron in place of YourLastName. Close the table by clicking Close on the
right side of the Sales Reps window.
e. Double-click the Customers table to open it in Datasheet view. Click New in the
Records group. Add a new record by typing the following information;
press Tab after each field:

Customer Name: Bavaro Driving School

Contact: Ricky Watters

Address1: 1 Clausen Way

Address2: Floor 2

City: South Bend

State: IN

Zip Code: 46614

Phone: (857) 519-6661

Credit Rating: A

P1 Assignment 3 Page 2 of 11 COSC 1701A/M/N W2022 Algoma University


Sales Rep ID: 2
f. Notice the pencil symbol in the record selector for the new row. This symbol
indicates the new record has not been saved. Press Tab. The pencil symbol
disappears, and the new customer is automatically saved to the table.
g. Click the City field for the second record (South Bend). Click Selection in the Sort
& Filter group, and select Equals “South Bend” to display the four customers
located in the town of South Bend.
h. Save and close the table by clicking Close on the right side of the Customers
window, and clicking Yes when asked if you want to save the changes.
i. Double-click the Products table to open it in Datasheet view. Click New in the
Records group. Add a new record by typing the following information:

Product ID: 26

ProductName: Robusto Dark Roast K-Cups

Description: 40/Box

Cost: 26

MarkupPercent: .75

RefrigerationNeeded No

Brand Premium
j. Add a second product using the following data:

Product ID: 27

ProductName: Robusto French Roast K-Cups

Description: 40/Box

Cost: 26

MarkupPercent: .75

RefrigerationNeeded No

Brand Premium

P1 Assignment 3 Page 3 of 11 COSC 1701A/M/N W2022 Algoma University


k. Click Advanced in the Sort & Filter group and select Filter By Form. Type >=20 in
the Cost field and click Toggle Filter in the Sort & Filter group.
All products costing $20 or more (there will be 8) display such as:

l. Save and close the table by clicking Close on the right side of the Products
window, and clicking Yes when asked if you want to save the changes.

m. Click the File tab, click Save As, and then double-click Back Up Database.
Accept the default backup file name and click Save.

n. Click Application Parts in the Templates group of the Create tab. Select Issues.
Click Next to accept the default relationship. Select CustomerName as the Field
from ‘Customers’, select Sort Ascending from Sort this field, and then
type Customer as the name for the lookup column. Click Create.

o. Double-click the Issues table to open it in Datasheet view.

p. Select Advantage Sales for the Customer and type Customer reports hazelnut
coffee delivered instead of decaf. in the Summary field. Leave all other fields as
the default values.

q. Close the database and exit Access and submit the file.

P1 Assignment 3 Page 4 of 11 COSC 1701A/M/N W2022 Algoma University


Q2 Employee Salary Analysis (Chapter 2, Textbook, Page 798) 40 marks

The Morgan Insurance Company offers a full range of insurance services. They store all of
the firm’s employee data in an Access database. This file contains each employee’s name
and address, job performance, salary, and title, but needs to be imported into a different
existing database. A database file containing two of the tables (Location and Titles) already
exists; your job is to import the employee data from Access to create the third table. Once
imported, you will modify field properties and set new relationships. The owner of the
company, Victor Reed, is concerned that some of the Atlanta and Boston salaries may be
below the guidelines published by the national office. He asks that you investigate the
salaries of the two offices and create a separate query for each city.

a. Open a02p2Insurance and save it as a02p2Insurance_LastFirst. Double-click


the Location table and review the data to become familiar with the field names
and the type of information stored in the table. Review the Titles table. Close both
tables.

b. Click the External Data tab, click Access in the Import & Link group, and then
complete the following steps:
▪ Click Browse and navigate to the a02p2Employees database in the location of
your student data files. Select the file, click Open.
▪ Click OK in the Get External Data – Access Database dialog box.
▪ Select the Employees table, and then click OK.
▪ Click Close without saving the import steps.

c. Double-click the Employees table in the Navigation Pane, then click View in the
Views group on the Home tab to switch to Design view of the Employees table.
Make the following changes:
▪ Ensure that the EmployeeID field is selected, and then click Primary Key in the
Tools group.
▪ Click the LastName field and change the Field Size property to 20.
▪ Change the Caption property to Last Name.
▪ Click the FirstName field and change the Field Size property to 20.
▪ Change the Caption property to First Name.
▪ Click the LocationID field and change the Field Size property to 3.
▪ Change the Caption property to Location ID.
▪ Click the TitleID field and change the Field Size property to 3.
▪ Change the Caption property to Title ID.
▪ Change the Salary field data type to Currency and change General Number in
the Format property in field properties to Currency.
▪ Save the design changes. Click Yes to the Some data may be lost warning.

P1 Assignment 3 Page 5 of 11 COSC 1701A/M/N W2022 Algoma University


d. Click View in the Views group to view the Employees table in Datasheet view and
examine the data. Click any record in the Title ID and then click Ascending in the
Sort & Filter group on the Home tab. Multiple employees are associated with the
T01, T02, T03, and T04 titles.

e. Double-click the Titles table in the Navigation Pane to open it in Datasheet view.
Notice that the T04 title is not in the list.

f. Add a new record in the first blank record at the bottom of the Titles table. Use the
following data:
▪ Type T04 in the TitleID field.
▪ Type Senior Account Rep in the Title field.
▪ Type A marketing position requiring a technical background and at least
three years of experience in the Description field.
▪ Type Four year degree in the Education Requirements field.
▪ Type 45000 in the Minimum Salary field.
▪ Type 75000 in the Maximum Salary field.

g. Close all tables. Click Yes if you are prompted to save changes to the Employees
table.

h. Click the Database Tools tab and click Relationships in the Relationships group,
and then Click Show Table. Follow the steps below:
▪ Double-click each of the three table names in the Show Table dialog box to add
it to the Relationships window and close the Show Table dialog box.
▪ Click and drag to adjust the height of the Employees table so that all fields
display in each one.
▪ Drag the LocationID field in the Location table onto the LocationID field in the
Employees table.
▪ Click the Enforce Referential Integrity and Cascade Update Related Fields
check boxes in the Edit Relationships dialog box to select them.
P1 Assignment 3 Page 6 of 11 COSC 1701A/M/N W2022 Algoma University
Click Create to create a one-to-many relationship between the Location and
Employees tables.
▪ Drag the TitleID field in the Titles table onto the TitleID field in the Employees
table (move the field lists by clicking and dragging their title bars as needed so
that they do not overlap).
▪ Click the Enforce Referential Integrity and Cascade Update Related Fields
check boxes in the Edit Relationships dialog box to select it. Click Create to
create a one-to-many relationship between the Titles and Employees tables.
▪ Click Save on the Quick Access Toolbar to save the changes to the
Relationships window and close the Relationships window.

i. Click the Create tab and click the Query Wizard in the Queries group. Follow the
steps below:
▪ Select Simple Query Wizard and click OK.
▪ Select Table: Employees in the Tables/Queries box.
▪ Double-click LastName in the Available Fields list to move it to the Selected
Fields list.
▪ Double-click FirstName in the Available Fields list to move it to the Selected
Fields list.
▪ Double-click LocationID in the Available Fields list to move it to the Selected
Fields list.
▪ Click Next.
▪ Type Employees Location as the query title and click Finish.
▪ Click View in the Views group on the Home tab to switch to Design view of the
query. Click and drag the Titles table from the Navigation Pane into the top
pane of the query design window.
▪ Double-click Title in the Titles table to add the field to the query design grid.

P1 Assignment 3 Page 7 of 11 COSC 1701A/M/N W2022 Algoma University


▪ Click the Sort cell of the LocationID field, click the arrow, and then
click Ascending.
▪ Click Run in the Results group (311 records display in the Datasheet sorted by
LocationID in ascending order). Double-click the border to the right of each
column to set the column widths to Best Fit.
▪ Save and close the query.
j.
k. Click the Create tab and click the Query Wizard in the Queries group. Follow the
steps below:
▪ Select Simple Query Wizard and click OK.
▪ Select Table: Location in the Tables/Queries box.
▪ Double-click Location in the Available Fields list to move it to the Selected
Fields list.
▪ Select Table: Employees in the Tables/Queries box.
▪ Double-click LastName, FirstName, and Salary.
▪ Select Table: Titles in the Tables/Queries box.
▪ Double-click MinimumSalary and MaximumSalary. Click Next.
▪ Ensure that the Detail (shows every field of every record) option is selected,
and click Next.
▪ Type Atlanta Salaries as the query title and click Finish.

l. Click View in the Views group on the Home tab to switch to Design view of the
Atlanta Salaries query.
▪ Click in the Criteria row of the Location field, and type Atlanta. Click the Sort
cell of the Salary field, click the arrow, and then click Ascending.
▪ Click Run in the Results group. Review the data to determine if any of the
Atlanta employees have a salary less than the minimum or greater than the
maximum when compared to the published salary range. These salaries will be
updated later.
▪ Save and close the query.

m. Right-click the Atlanta Salaries query in the Navigation Pane and from the
shortcut menu, select Copy. Right-click a blank area in the Navigation Pane and
select Paste. In the Paste As dialog box, type Boston Salaries for the query
name. Click OK.

n. Right-click the Boston Salaries query in the Navigation Pane and select Design
View. In the Criteria row of the Location field, replace Atlanta with Boston.
▪ Click Run in the Results group. Review the data to determine if any of the
Boston employees have a salary less than the minimum or greater than the
time
▪ Modify some data that have been incorrectly entered. In the query results, for
the first employee, Frank Cusack, change the salary to $48,700.00; for Brian
Beamer, $45,900.00; for Lorna Weber, $45,700.00; for Penny
Pfleger, $45,800.00.
▪ Save and close the query.

o. Close the database and submit a02p2Insurance_LastFirst.


P1 Assignment 3 Page 8 of 11 COSC 1701A/M/N W2022 Algoma University
Q3 Creating a Single-Table Database from Scratch 20 marks

Create a new database and name it subscribers. Create the customers tables that has
the following fields:

Name (short text).


e-amil address (hyperlink).
Phone number (short text, a telephone numb er mask has to be specified.
Subscription Date (time/date)
Two-Year Subscription (Yes/No).
Account Number (Long Integer, Primary Key, starts with 10001).
Provence (Text, Default Value: Ontario).
Country (Short Text, Default Value: Canada).
Rate (Currency).
Tax (Currency).
Order Total Amount: (Calculated).
Number of Years (Number)
- Populate the table with 10 records with data of your own.
- Implement 1 or 2 years subscriptions for your data.
- Implement calculation for the order total amount.

P1 Assignment 3 Page 9 of 11 COSC 1701A/M/N W2022 Algoma University


Q4 The Prestige Hotel 15 marks

The Prestige Hotel chain caters to upscale business travelers and provides state-of-the-
art conference, meeting, and reception facilities. It prides itself on its international, four-
star cuisine. Last year, it began a member reward club to help the marketing department
track the purchasing patterns of its most loyal customers. All of the hotel transactions are
stored in a database. Your task is to help the managers of the Prestige Hotels in Denver
and Chicago identify their customers who stayed in a room last year and who had three
persons in their party.

A. Open a02m2Hotel and save the file as a02m2Hotel_LastFirst. Review the data
contained in the three tables. Specifically, study the tables and fields containing the
data you need to analyze: dates of stays in Denver and Chicago rooms, the
members’ names, and the numbers in the parties.
B. Import the location data from the Excel file a02m2Location.xlsx as a new table in
the current database. Using the wizard, specify that the first row contains column
headings, set the LocationID field to be indexed with no duplicates, and set the
LocationID field as the primary key. Import the table with the default name Location
and do not save the import steps.
C. View the Location table in Design view and change the field size for the LocationID
field to Long Integer. Save the table. Click Yes in the dialog box indicating that
some data may be lost. Close the table.
D. Add the Location, Orders, Members, and Service tables to the Relationships
window to begin establishing relationships in the database. Close the Show Table
dialog box. Create a one-to-many relationship between the Location table and the
Orders table using the LocationID field. Enforce Referential Integrity. Select the
option to cascade update the related fields.
E. Create a relationship between the Members and Orders tables using the
MemNumber field, ensuring that you enforce referential integrity and cascade
update related fields.
F. Create a relationship between the Service and Orders tables using the ServiceID
field, ensuring that you enforce referential integrity and cascade update related
fields. Save and close the Relationships window.
G. Create a new query in Design view using Location, Members, Orders, and Service
tables. Add the following fields to the query (in this order): ServiceDate from the
Orders table; City from the Location table, NoInParty from Orders table;
ServiceName from the Service table; and FirstName and LastName from the
Members table. Set the criteria in city field to limit the output to Denver.
H. Display only service dates from 7/1/2017 to 6/30/2018 (Hint: Use the Between
operator).
I. Set the NoInParty criterion to 2. Sort the results in ascending order by the
ServiceDate. Run and save the query with the name Denver Rooms 2 Guests.
J. Use Design view to change the order of the query fields so that they display as
FirstName, LastName, ServiceDate, City, NoInParty, and ServiceName. Run, save
the changes to the query, and close the query.

P1 Assignment 3 Page 10 of 11 COSC 1701A/M/N W2022 Algoma University


K. Copy the Denver Rooms 2 Guests query and paste it in the Navigation Pane,
renaming the new query Chicago Rooms 2 Guests.
L. Open the Chicago Rooms 2 Guests query in Design view and change the City
criterion from Denver to Chicago. Run the query and save the changes. Close the
query.
M. Close the database and exit Access. Based on your instructor’s directions, submit
a02m2Hotel_LastFirst.

P1 Assignment 3 Page 11 of 11 COSC 1701A/M/N W2022 Algoma University

You might also like