COSC 1701A, M, N, Computer Applications, W22, Assignment-3 Part-1v02
COSC 1701A, M, N, Computer Applications, W22, Assignment-3 Part-1v02
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.
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.
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.
Address2: Floor 2
State: IN
Credit Rating: A
Product ID: 26
Description: 40/Box
Cost: 26
MarkupPercent: .75
RefrigerationNeeded No
Brand Premium
j. Add a second product using the following data:
Product ID: 27
Description: 40/Box
Cost: 26
MarkupPercent: .75
RefrigerationNeeded No
Brand Premium
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.
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.
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.
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.
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.
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.
Create a new database and name it subscribers. Create the customers tables that has
the following fields:
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.