Вы находитесь на странице: 1из 8

Access Database Case Study

This is an individual assessment. Therefore, you are NOT allowed to share files with each other related to
this assessment, you are NOT allowed to work in groups on this assessment, and you are NOT allowed to
give or receive any other type of help on this assessment except for help from the instructor or the
resources explicitly provided to you by the instructor for use on this assessment. Your submission should
be 100% your OWN work and by making a submission for this assessment you are implying that the work
you have submitted is entirely your own!

For this assessment, you will use Microsoft Access to construct a database for a board game distributor that
will include six tables, a form, eight queries, and two reports based on the instructions provided in this
document.

Create a new database and name it using your last name and the name of the assessment (e.g.,
Smith_AccessCaseStudy.accdb). Make sure you are saving it in a location that will be accessible to you
(e.g., if you are using the COI Labs Virtual Desktop, make sure your database is in your network folder).

Setting up the Tables


Start by importing the data from the States.txt file, included with these instructions, into a new table. Refer
back to the tutorial walkthrough, if you need a reminder for how to import data from a text file. This will
allow you to use the States table as the lookup field for the States field in the Vendors and Customers
tables. Once that is complete, use the following information to construct and format five more tables in
your database. Required properties for each field are provided, but you will need to determine the proper
data type based on the required field properties (e.g., Field Size = # will require a Short Text data type).

Vendors: primary key will be VendorID


 VendorID: Field Size = 3, Input Mask = L00
 VendorName: Field Size = 35
 StreetAddress: Field Size = 50
 City: Field Size = 25
 State: Field Size = 2, On the Lookup tab, Display Control = Combo Box, Row Source Type =
Table/Query, Row Source = States, Bound Column = 1, Column Count = 2, Column Widths = .5”;2”
Limit to List = Yes
 ZipCode: Field Size = 5, input Mask = 00000
 ContactName: Field Size = 30
 ContactPhone: Field Size = 10, Input Mask = (000) 000-0000
 Preferred: Format: Yes/No

Customers: primary key will be CustomerID


 CustomerID: Field Size = 5, Input Mask = 00000
 CustomerName: Field Size = 35
 StreetAddress: Field Size = 50
 City: Field Size = 25
 State: Field Size = 2, On the Lookup tab, Display Control = Combo Box, Row Source Type =
Table/Query, Row Source = States, Bound Column = 1, Column Count = 2, Column Widths = .5”;2”
Limit to List = Yes
 ZipCode: Field Size = 5, input Mask = 00000
 PhoneNumber: Field Size = 10, Input Mask = (000) 000-0000
 SalesTaxRate: Field Size = Single, Format = Percent
 CreditLimit: Format = Currency

Inventory: primary key will be GameSKU


 GameSKU: Field Size = 6, Input Mask = L00-000
 GameName: Field Size = 40
 VendorID: Field Size = 3, On the Lookup tab, Display Control = Combo Box, Row Source Type =
Table/Query, Row Source = Vendors, Bound Column = 1, Column Count = 2, Column Widths =
.5”;2” Limit to List = Yes
 MinPlayers: Field Size = Byte, On the Lookup tab, Display Control = List Box, Row Source Type =
Value List, Row Source = 1;2;3;4;5;6;7;8
 MaxPlayers: Field Size = Byte, On the Lookup tab, Display Control = List Box, Row Source Type =
Value List, Row Source = 1;2;3;4;5;6;7;8
 RecommendedAge: Field Size = 3, On the Lookup tab, Display Control = List Box, Row Source Type =
Value List, Row Source = 08+;09+;10+;11+;12+;13+;14+
 PlayingTime: Field Size = 10, On the Lookup tab, Display Control = List Box, Row Source Type =
Value List, Row Source = <30 Min;30-60 Min;60-90 Min;90-120 Min;>120 Min
 MSRP: Format = Currency

SalesOrder: primary key will be SalesOrderNumber


 SalesOrderNumber: use the AutoNumber data type
 SalesOrderDate: Format = Short Date, Input Mask = 00/00/0000
 CustomerID: Field Size = 5, On the Lookup tab, Display Control is set to Combo Box, Row Source
Type is set to Table/Query, Row Source is set to Customers, Bound Column = 1, Column Count = 2,
Column Widths = .5”;2” Limit to List = Yes
 OnCredit: Format = Yes/No

SalesOrderItem: primary key will be a composite key of SalesOrderNumber and GameSKU


 SalesOrderNumber: use the Number data type
 GameSKU: Field Size = 6, On the Lookup tab, Display Control is set to Combo Box, Row Source Type
is set to Table/Query, Row Source is set to Inventory, Bound Column = 1, Column Count = 2,
Column Widths = 1,2 and Limit to List = Yes
 SalePrice: Format = Currency
 Quantity: Field Size = Byte

Like the tutorial, you will need to define relationships between the tables you have created. Refer back to
the tutorial walkthrough, if you need a reminder of how to set up table relationships. Make sure to enforce
Referential Integrity for all relationships. Adjust the tables in the Relationships window so all fields are
visible and the relationship lines do not cross behind any of the tables.
Populating the Tables with Data
You will need to populate the tables with data. You will populate most of the data in the Vendors,
Customers, and Inventory tables with external data imported into your database. The data for the Vendors
and Customers tables are in Excel files and the data for the Inventory table is in an XML file. All of those
files are included with these instructions. Refer back to the tutorial walkthrough, if you need a reminder for
how to import data from Excel and XML files.

The Vendors table should have nine records imported from the Vendors.xlxs file. I would like you to add
one additional record to the Vendors table that will have your home address and your home phone number
with you as the contact person and it should be a preferred vendor. Notice that the VendorID always
begins with the first letter of the VendorName.

The Inventory table should have 36 records imported from the Inventory.xml file. I would like you to add
four additional records to the Inventory table. http://www.boardgamegeek.com is a good site to find
information on board games. Assign the vendor you created as the vendor of the four inventory records
you create. Notice that the GameSKU begins with the VendorID so be sure to follow the same pattern.

The Customers table should have 13 records imported from the Customers.xlsx file. I would like you to add
two additional records to the Customers table. The customer records you create can be whatever you
want.

The Vendors table should now have 10 records, the Inventory table should have 40 records, and the
Customers table should have 15 records.

To populate the SalesOrders and SalesOrderItem tables, I would like you to create a form for SalesOrders
and use the form to add records to those two tables. Like the tutorial, the form should automatically
include a subform for the SalesOrderItem table, if you created the relationships correctly. The form should
also include drop down boxes for Customer and Inventory fields so you can select records from those tables
when creating orders. Create two orders for each customer with five inventory items on each order and
quantities between 2 and 10 for each item. The first order for each customer should be made in September
and the second in October. Set the sales prices between $15 and $75. Make about half the orders on
credit. When finished, you should have 30 sales orders and 150 records in the SalesOrderItem table.

Queries and Reports


You are now ready to create some queries and reports based on the data in your tables. Create all queries
in Query Design.
Create a new query and add the Inventory table to it. Add all of the fields from the table to the bottom
section of the query window. Use criteria to limit the results to games that can be played by a single player
and sort the results in descending order by RecommendedAge. Name the query SinglePlayerGames.

Create another new query and again add the Inventory table to it. Add all the fields from the table to the
bottom section of the query window. Use criteria to limit the results to games that can be played by six or
more people and which have an MSRP of less than $40. Sort the results in ascending order by MSRP and
name the query InexpensiveGroupGames.

You will now create a report based on a query that displays games from preferred vendors grouped by
vendor. Create a new query and add the Inventory and Vendor tables to it. Add the VendorID,
VendorName and Preferred fields from the Vendor table and the GameSKU and GameName fields from the
Inventory table. Use criteria to limit the results to games from preferred vendors, but do not display the
Preferred field in the query results. Sort the results in ascending order by GameSKU and name the query
PreferredGames.
Now highlight the query you just created in the list of database objects and create a report based on that
query. Group the report by VendorID and format it so each VendorName is displayed once next to the
VendorID. Adjust the report title, field names, and other elements to match your report with the example
below. Save the report as PreferredGames.

Next, you will create a query that calculates order totals based on quantity and price and sales tax rate.
Create a new query and add the Customers, SalesOrders, and SaleOrderItem tables to it. Add the
SalesOrderNumber from the SalesOrder table and the GameSKU, Quantity, and SalePrice from the
SalesOrderItem table. Create calculated fields for Subtotal, Tax, and TotalWithTax. Refer back to the
tutorial walkthrough, if you need a reminder how to create calculated fields. You will need to format the
Tax field as Currency. Save the query as OrderItemTotals.
Now you will create a parameter query to limit the results to a criteria specified by the user. Create a new
query and add the Customer, SalesOrders, SalesOrderItem, and Inventory tables. Also, add the OrderTotals
query you created in the last step. Add the necessary fields from the tables and the query to generate the
structure in the example below. Use a parameter value in the criteria row to prompt the user to “Enter a
CustomerID”. Save the query as CustomerInvoice.

Now highlight the query you just created in the list of database objects and create a report based on that
query. Format the report to match the structure in the example below. You will need to use grouping,
totals, field formatting, and adjust the report title and field names. Save the report as CustomerInvoice.

Next, you will create a totals query that displays how many of each game has been sold. Create a new
query and add the SalesOrderItem and Inventory tables to it. Add the GameSKU and GameName fields
from the Inventory table and the Quantity field from the SalesOrderItem table. Use the Totals function,
which is in the Design tab to sum the Quantity field and change the name of that summed field to TotalSold
so that your results look like the example on the following page. Save the query as PopularGames.
Now you will create a pair of queries that calculates the remaining credit of each vendor. Start by creating
a query to produce the total price of each credit order. Create a new query and add the OrderItemTotals
query and the SalesOrders table to it. Add the SalesOrderNumber and TotalWIthTax fields from the
OrderItemTotals query and the OnCredit field from the SalesOrders table. Sum the TotalWithTax field and
change the name of that summed field to CreditTotal. Limit the results using criteria to only display totals
on credit, but do not display the OnCredit field in the results. Your query output should have the same
structure as the example below. Save the query as CreditOrderTotals.

Create a new query and add the Customers and SalesOrders tables and the CreditOrderTotals query to it.
Add the appropriate fields from the tables to match the structure in the example below. The
CreditRemaining field will need to be a calculated field using a formula. Save the query as CreditRemaining.
Your database should now contain six tables, eight queries, one form, and two reports.

Deliverables
 Name your Access file using your last name and the name of the assessment (e.g.,
Smith_AccessCaseStudy.accdb).
 Submit your completed Access file through the Access Database Case Study submission page on
Canvas.

Grading Rubric
Requirements Points
The Vendors table is properly constructed with the field names and metadata requirements
4
specified in the instructions
The Customers table is properly constructed with the field names and metadata
4
requirements specified in the instructions
The Inventory table is properly constructed with the field names and metadata requirements
4
specified in the instructions
The SalesOrders table is properly constructed with the field names and metadata
4
requirements specified in the instructions
The SalesOrderItem table is properly constructed with the field names and metadata
4
requirements specified in the instructions
The Vendors, Customers, and Inventory tables are populated with data imported from the
4
included Excel and XML files and your own unique entries
The SalesOrders form is properly constructed 4
The SalesOrders and SalesOrderItem tables are populated with data based on the
8
instructions using the SalesOrder form
The SinglePlayerGames query is properly constructed based on the instructions 4
The InexpensiveGroupGames query is properly constructed based on the instructions 4
The PreferredGames query are properly constructed based on the instructions 4
The PreferredGames report is properly constructed based on the instructions 4
The OrderItemTotals query is properly constructed based on the instructions 4
The CustomerInvoice query is properly constructed based on the instructions 4
The CustomerInvoice report is properly constructed based on the instructions 8
The PopularGames query is properly constructed based on the instructions 4
The CreditOrderTotals query is properly constructed based on the instructions 4
The CreditRemaining query is properly constructed based on the instructions 4