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 solutionStudents 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…
Chapter 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
- In java create an application to manage your data base information the database is already created in mysql tables, the tables are fill, So the user can use your database application user friendly Retrieve all data: Given a table name, retrieve all data from the table and present it to the user. Average: Given a table name and a column name, return the average of the column. Here the assumption is that the column type will be numeric (e.g., cost column). Insert: Given a table name, your program should show the column names of that table and ask the users to input new data to the table. In case of errors, your program should directly show the MySQL errors to the users. Assumption 1: Users will enter data according to the database constraints. Assumption 2: Users will input one record at a time. Delete: Given a table name, your program should show the column names of that table and ask the users to input data that they want to delete. Assumption 1: Users will enter data according to the…arrow_forwardIn Python Program: Create a small Family database with one table to include data about members of your family. Include data fields such as first name, last name, type of relationship, hometown, and age. Include one field that uniquely identifies each record, such as a family member number. You can be creative with the family member number or use the auto-generated number from the database. Populate the database with members of your family. Be sure to include data about yourself in the table. Place at least 10 records in your database table, even if it is necessary to make up information. Write a program to display all of the data that appears in the database table on a data grid.arrow_forwardThe SQLiteOpenHelper and SQLiteCursor classes are described, with a focus on how they may be used to perform create, read, update, and delete (CRUD) actions on a SQLite database.arrow_forward
- Q2: Design Database for the following scenario and Write SQL queries. Create an ERD for the following scenario. Suppose there is a grocery store near your house. Following can be considered for ERD: A grocery store may have more than one employee. A grocery store has exactly one manager. The manager has one or more sales men working under him. Grocery store has more than one portion for the products. • Each product has a barcode, name, expired date. Many customers can busy many products, but each product is bought by only one customer. Each customer will get an invoice for his /her purchase. The bill invoice has an id.arrow_forwardBelow is “Book Order,” the only table in library management system’s database. The design of “Book Order” as you may tell is in the zero normal formal form, you as the database designer want to convert the design into the third normal form. Order ID Special order date Customer ID Customer last name Customer First name Customer birth date Book ISBN1 Book Title 1 Book Author 1 Book publication year 1 Book ISBN2 Book Title 2 Book Author 2 Book publication year 2 Store ID Store name Store location Special order status Book Order(Order ID, Special order date, Customer ID, Customer last name, Customer First name, Customer birth date, Book ISBN1, Book Title 1, Book Author 1, Book publication year 1, Book ISBN2, Book Title 2, Book Author 2, Book publication year 2, Store ID, Store name, Store location, Special order status)arrow_forwardPATHS is a table that contains information about paths on a number line. The structure of PATHS is as follows, where x1 and x2 represent that there is a path from Coordinate x1 to Coordinate x2 (You can't move from Coordinate x2 to Coordinate x1 ). NAME ΤΥΡE NULLABLE X1 INT FALSE X2 INT FALSE Problem Please write an SQL statement that returns the beginning and end point of each path in PATHS . Sort them by the value of the beginning point in ascending order. Constraints • In the case where a direct path from Coordinate a to Coordinate b is available, no path from Coordinate b to Coordinate a will be given. |x1-x2| = 1 • No path will overlap with one another. Example Suppose that PATHS is as follows: x1 x2 1 2 2 3 4 7 7 6 This table can be visualized as follows: START END END START 7 8. 9 Therefore, your SQL statement must return the following: start end 1 4 8 6arrow_forward
- You need to use Java to connect with the mysql and create a simple mysql system. Databases "POS" have 4 tables 1. Staff_Info Staff_ID Staff_Name Staff_Pw Staff_Title 001 AA 1111 Manager 002 BB 2222 General Once the pos system opened, you need to ask the staff to enter the password. The manager can see the payment record if needed, which the general staff cannot. Food_Info Food_ID Food_Cat Food_Name Price 001 burger Classic burger 32 002 burger Chicken burger 38 003 side Fires 10 004 side Salad 15 005 beverage Coke 5 006 beverage Lemon Tea 8 There are only three categories of food, and 6 in total. Order_Info Order_ID Payment_ID Order_Item Order_Quantity Order_ID and Payment_ID should be automatically generated from 0001. Payment_Info Payment_ID Payment_Amount Payment_Date Payment_Time Payment_Method There are two types of…arrow_forwardconnect sql with this code class DiplomaProgram: def __init__(self): self.listCourse = set() def addCourse(self, course): self.listCourse.add(course) def removeCourse(self, course): self.listCourse.remove(course) def listPassedStudent(self): listStudent = set() for course in self.listCourse: for student in course.listStudent: if student not in listStudent and student.isPassed(): student.printInfo() listStudent.add(student) def listDistinctStudent(self): listStudent = set() for course in self.listCourse: for student in course.listStudent: if student not in listStudent and student.isDistinct(): student.printInfo() listStudent.add(student) class Course: id = 1 def __init__(self, name, assignments): self.name = name self.id = Course.id…arrow_forwardSQL A table Products have: a name (TEXT) a description (TEXT) a unit cost stored in cents (INTEGER) and of course we also add an id column to identify them. Separately, we'd like to track the number of items in stock for each product. To do so we'll have a store and an inventory table. Stores have just an id and a name. Then, our inventory table should combine stores and products, listing how much of each product each store has in stock. a product_id (INTEGER) a store_id (INTEGER) a quantity (INTEGER) in stock Now we can insert some stores, products and inventory into our database. There are 2 stores -- one called NY and one called NJ. There are 2 products we are concerned with. Their names are sneakers, costing $220 (remember this is dollars!) and boots costing $350. Use any description for each that you'd like. NY has 4 sneakers in stock and 3 boots. NJ has 5 sneakers in stock and no boots. Insert the above data into the tables you have created.arrow_forward
- We need to create a database for the Circulation Department of a public library. The database will store information about the patrons, books, and circulation. It contains the following: 4 tables for the database: PATRON, BOOK_COPY, BOOK, and CHECKOUT. (Since a book may have multiple copies that may be purchased by the library at different time, it is better to have a BOOK_COPY table to avoid unnecessary data redundancy.) The data in the tables are as follows: PATRON table records a patron’s ID, name, address, phone number, and email address. BOOK table contains information such as author, title, publication date, subject, language, and a unique identifier (It can be the ISBN of the book) for each book. BOOK_COPY table records a unique identifier for each copy of a book, the date of purchase, and the identifier of the book from the BOOK table. CHECKOUT table records the date of check-out, patron’s ID, the…arrow_forwardWe need to create a database for the Circulation Department of a public library. The database will store information about the patrons, books, and circulation. It contains the following: 4 tables for the database: PATRON, BOOK_COPY, BOOK, and CHECKOUT. (Since a book may have multiple copies that may be purchased by the library at different time, it is better to have a BOOK_COPY table to avoid unnecessary data redundancy.) The data in the tables are as follows: PATRON table records a patron’s ID, name, address, phone number, and email address. BOOK table contains information such as author, title, publication date, subject, language, and a unique identifier (It can be the ISBN of the book) for each book. BOOK_COPY table records a unique identifier for each copy of a book, the date of purchase, and the identifier of the book from the BOOK table. CHECKOUT table records the date of check-out, patron’s ID, the…arrow_forwardYou have been tasked to develop a program using Windows Presentation Foundation (WPF) to be used in a coffee shop. The application will assist management with the following: 1. Keep track of all daily and monthly sales using a SQL database 2. Dailly, Monthly, and yearly backup of all sales for future use on a txt file 3. The customer order processing (Type of coffee, quantity, price, total) For the interface design you are only allowed to use Tabs for Management and order module. You will need an extra window to validate the management request to save information to a txt file or to print sales information from the database. The graphical user interface of the application will look as follows: 1. Management The management Tab will have several controls as shown on the GUI in Figure 1.1. Among the controls you will have 3 Buttons (b1, b2, and b3). The user will have to select a specific period (date, month, or year) they want to save, print, or view information.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
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