0% found this document useful (0 votes)
17 views4 pages

C07 Exercise07

iCarnegie University Exercises

Uploaded by

Axel
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)
17 views4 pages

C07 Exercise07

iCarnegie University Exercises

Uploaded by

Axel
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/ 4

DATABASE AND CLIENT/SERVER

APPLICATIONS
EXERCISE 07 - TEST CASES FOR NORTHWIND QUERIES

NAME: MARCO FABIAN SANCHEZ PEREZ

PURPOSE
The purpose of this assignment is to develop test cases to demonstrate that the requested SQL queries work
correctly.
ACTIVITIES
Perform each of the following activities. If you have questions, issues, or doubts, please ask for help and do not just
guess.
1. The three reports requested by Glen North are:
a. Write and execute the SQL to list all customer information for company, last name, first name, city, and
state.
b. Write and execute the SQL to list all orders by “Customer A”, including the customer company, last
name, first name, order id, order date, product id(s), and totals for the order.
c. Write and execute the SQL to list all shipments using “Shipping Company A”, including the shipping
company name, last name, first name, order id.
2. Before writing these queries, it is a good idea to develop the test cases that demonstrate that the queries are
correctly implemented. This is known as test-driven development (TDD) or test-first programming (TFP). TDD is a
good way to build software, because it drives a precise understanding of what the requirements mean.
In this case, the Northwind Traders database, as provided with Microsoft Access, does not include any orders,
although it does include customers and shippers. Populating the database with records will verify that the
reports are correctly implemented.
For example, the database should have orders shipped by “Shipping Company A” and by other shippers to
demonstrate that query c only includes the “Shipping Company A” shipments. It should include multiple
shipments to demonstrate that all of the “Shipping Company A” records are included in the report.
Create records that demonstrate the execution of the SQL queries to be written in the Northwind Traders
database. The original version of the database with the login screen and the data entry forms is the most
convenient for populating the database consistently and completely with the test data.
Every team will generate a different set of test cases. The question is whether your team's test cases adequately
cover the correct functioning, and possible mistakes, that might occur in writing your SQL code. In general, it is
not feasible to do comprehensive testing. There is an economic tradeoff in terms of the impact of defects and
the amount of resources we spend on testing. Please try to make useful choices -- a full discussion of test
coverage is outside the bounds of this course.
3. Document the test data that you will use to demonstrate each of the three SQL queries required and what you
are testing for by including those records:
a. For query a, there are already customers ‘A’ to ‘Z’ in the database with names, city, and state. This is
satisfactory for testing the query.
b. There are no orders in the database. Add orders for ‘Customer A’ (3), ‘Customer B’, and ‘Customer Z’
(2). Order one item, two items, and three items for ‘Customer A’; three items for ‘Customer B’, and one
item for ‘Customer Z’.
c. Use ‘Shipping Company A’ for the one- and three-item orders for ‘Customer A’ and the three-item order
for ‘Customer B’. Use ‘Shipping Company C’ for the other two orders.
4. Document the expected results of running the queries against this test data.
Note that the table below is illustrative of the answers students might get for b and c, but since
we did not specify the exact contents of each order, exact answers will vary.
a)

Company Name City State Province

Customer A Bedecs, Anna Seattle WA

Customer B Gratacos Boston MA


Solsona,
Antonio

Customer C Axen, Thomas Los Angeles CA

Customer D Lee, Christina New York NY

Customer E O’Donnell, Minneapolis MN


Martin

Customer F Pérez-Olaeta, Milwaukee WI


Francisco

Customer G Xie, Ming-Yang Boise ID

Customer H Andersen, Portland OR


Elizabeth

Customer I Mortensen, Salt Lake City UT


Sven
Customer J Wacker, Roland Chicago IL

Customer K Krschne, Peter Miami FL

Customer L Edwards, John Las Vegas NV

Customer M Ludick, Andre Memphis TN

Customer N Grilo, Carlos Denver CO

Customer O Kupkova, Honolulu HI


Helena

Customer P Goldschmidt, San Francisco CA


Daniel

Customer Q Bagel, Jean Seattle WA


Philippe

Customer R Autier Miconi, Boston MA


Catherine

Customer S Eggerer, Los Angeles CA


Alexander

Customer T Li, George New York NY

Customer U Tham, Bernard Minneapolis MN

Customer V Ramos, Luciana Milwaukee WI

Customer W Entin, Michael Portland OR

Customer X Hasselberg, Salt Lake City UT


Jonas

Customer Y Rodman, John Chicago IL

Customer Z Liu, Run Miami FL

b)
Company Name ID Order Date Product Order Total

Customer A Bedecs, Anna 1 6/12/2012 Northwind Traders $156.75


Boysenberry Spread

Customer A Bedecs, Anna 1 6/12/2012 Northwind Traders Olive Oil $156.75

Customer A Bedecs, Anna 4 7/3/2012 Northwind Traders Cherry Pie $20.88


Filling

Customer A Bedecs, Anna 5 7/3/2012 Northwind Traders Chicken $191.74


Soup

Customer A Bedecs, Anna 5 7/3/2012 Northwind Traders Cajun $191.74


Seasoning

Customer A Bedecs, Anna 5 7/3/2012 Northwind Traders Brownie $191.74


Mix

c)

Company Name ID

Shipping Company A , 2

Shipping Company A , 4

Shipping Company A , 5

5. Store the test data in a test version of the Northwind Traders database for use in testing your SQL queries. Name
it ‘C07_P01_Northwind.accdb’.
6. Save and archive your work, replacing “YourID” with your student identifier, and upload it to the LMS.

You might also like