Using MIS (10th Edition)
10th Edition
ISBN: 9780134606996
Author: David M. Kroenke, Randall J. Boyle
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter AE, Problem AE9.2
It is surprisingly easy to create a market-basket report using table data in Access. To do so, however, you will need to enter SQL expressions into the Access query builder. Here, you can just copy SQL statements or type them in. If you take a
- a. Create an Access database with a table named Order_Data having columns Order-Number, ItemName, and Quantity, with data types Number (LongInteger), Short Text (50), and Number (LongInteger), respectively. Define the key as the composite (OrderNumber, ItemName). (You can do this in the table designer by highlighting both columns and clicking the Primary Key icon.)
- b. Import the data from the Excel file Ch09Ex02_U10e.xlsx into the Order_Data table.
- c. Now, to perform the market-basket analysis, you will need to enter several SQL statements into Access. To do so, click CREATE/Query Design. Click Close when the Show Table dialog box appears. Right-click in the gray section above the grid in the window. Select SQL View. Enter the following expression exactly as it appears here:
SELECT | T1.ItemName as First Item, |
T2.ItemName as SecondItem | |
FROM | Order_Data T1, Order_Data T2 |
WHERE | T1.OrderNumber = |
T2.OrderNumber | |
AND | T1.ItemName <> T2.ItemName; |
Click the red exclamation point in the toolbar to run the query. Correct any typing mistakes and, once it works, save the query using the name TwoItem Basket.
- d. Now enter a second SQL statement. Again, click CREATE/Query Design. Click Close when the Show Table dialog box appears. Right-click in the gray section above the grid in the window. Select SQL View. Enter the following expression exactly as it appears here:
SELECT | TwoItemBasket.FirstItem, |
TwoItemBasket.SecondItem, | |
Count (*) AS SupportCount | |
FROM | TwoItemBasket |
GROUP BY | TwoItemBasket.FirstItem, |
TwoItemBasket.SecondItem; |
Correct any typing mistakes and, once it works, save the query using the name SupportCount.
- e. Examine the results of the second query and verify that the two query statements have correctly calculated the number of times that two items have appeared together. Explain further calculations you need to make to compute support.
- f. Explain the calculations you need to make to compute lift. Although you can make those calculations using SQL, you need more SQL knowledge to do it, and we will skip that here.
- g. Explain, in your own words, what the query in part c seems to be doing. What does the query in part d seem to be doing? Again, you will need to take a database class to learn how to code such expressions, but this exercise should give you a sense of the kinds of calculations that are possible with SQL.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionChapter AE Solutions
Using MIS (10th Edition)
Ch. AE - The spreadsheet in Microsoft Excel file...Ch. AE - Prob. AE1.2Ch. AE - Prob. AE2.1Ch. AE - Prob. AE2.2Ch. AE - Prob. AE3.1Ch. AE - In this exercise, you will learn how to create a...Ch. AE - Prob. AE4.1Ch. AE - Prob. AE4.2Ch. AE - In some cases, users want to use Access and Excel...Ch. AE - Prob. AE5.2
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- How is the processing of SQL DDL statements (such as CREATE TABLE) different from the processing required by DML statements?arrow_forwardSQL includes many numerical functions. Two of these functions are FLOOR and CEIL. Use the Internet to research these functions. Are the functions available in Oracle, SQLServer, and Access? Write a paragraph that discusses what the functions do and anydifferences and/or similarities between the functions in Oracle, SQL Server, and Access.Then perform the following tasks: a. Solmaris Condominium Group would like to know the impact of discounting its condofees by 3 percent. Write an SQL statement in Oracle that displays the condo ID, unitnumber, discounted condo fee, discounted condo fee with the CEIL function, anddiscounted condo fee with the FLOOR function. b. Based on your research, will the values in the three columns vary? If so, how? Usethe condo with the ID of 1 to explain your answer. Be sure to cite your references.arrow_forwardWrite the SQL code that will restore the data to its original status: that is, the table should contain the data that existed before you made the changes in Problems 5 and 6.arrow_forward
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY