Using MIS (10th Edition)
Using MIS (10th Edition)
10th Edition
ISBN: 9780134606996
Author: David M. Kroenke, Randall J. Boyle
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
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 database class, you will learn how to code SQL statements like those you will use here.

  1. 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.)
  2. b. Import the data from the Excel file Ch09Ex02_U10e.xlsx into the Order_Data table.
  3. 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.

  1. 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.

  1. 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.
  2. 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.
  3. 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.
Blurred answer
Students have asked these similar questions
Using the getFirst() function as a template for reference, code the saveProduct() function that will be called when the save button of the depicted screen is clicked. The text from the JTextFields will be used as parameters.The database schema for the SQL tables are also depicted. The number of the product is the primary key and is set to auto-increment.  public Product getFirst()    {                 if (openConnection())         {             try{                 Product temp = null;                 String query = "SELECT * FROM products order by number asc limit 1"; // our SQL SELECT query.                 Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); // create the java statement                 ResultSet rs = st.executeQuery(query);// execute the query, and get a java resultset                 while (rs.next()) // iterate through the java resultset                 {                     temp = new…
If I have a table in sql database phpmyadmin the table's column : ID Name Salary City 1 John 200 London 2 Eric 300 Paris 3 Michael 450 Milan in php we have to create dropdown menu show the names coming from the database  when the user choose a name from the menu will show the salary for this person .  one more thing there is no sumbit button , I mean when the user choose a name from the dropdown menu will show  the salary without any click.  would you help to create php code and javascript if it's needed.
An insurance company needs to store their salespeople’s information who are selling their insurance policies. They already have a database with multiple tables, one of the tables (Salesperson) stores information about each salesperson along with the bonus percent they receive, based on the city where the insurance is sold. The table has the following fields:   Salesperson(spID, spName, spBirthDate,spCitySelling, bonusPercent) spID: Unique identification number of the salesperson. spName: Full name of the salesperson. spBirthDate: Birthdate of the salesperson. spCitySelling: The city in which the salesperson is selling the insurance. bonusPercent: The bonus percent received by the salesperson based on the city in which he/she sells the insurance.   Each salesperson can sell the insurance in just one city. However, for a city, there can be more than one salesperson appointed. Also, the bonus percent is fixed for each city. For example, all of the salespeople who sells insurance in…
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
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