This question relates to transactions and concurrency. You may find it helpful to use transaction histories...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This question relates to transactions and concurrency. You may find it helpful to use transaction histories to explain your answers. Customers of Kim's Coffee are automatically enrolled in a loyalty scheme. Customers receive a bonus point each time they make a purchase. These are stored in Kim's database and a query is provided so that customers can see the number of points they have (their balance) at any time. To increase business and attract new customers, Kim's Coffee has two special promotions. During "Add 5" weeks, customers receive 5 bonus points instead of 1 when they make a purchase. In "Double Dip" weeks the balance of customers who make a purchase is doubled. Kim's Coffee has a transaction for each of these. • 15 reads a customer's balance, adds 5 to it, writes it back to the database and commits. • T2 reads a customer's balance, doubles it, writes it back to the database and commits. This week Kim's Coffee is offering both promotions. A customer, Lee, calls to complain. He says "I have only made one purchase this week. My points balance was 4 and now it is 13 –I think it should be more." Another customer, Alex, also complains saying "I have only made one purchase this week. My points balance was 4 and now it is 8–I didn't get my extra 5 points." Kim checks the logs and is horrified to discover that customers who had 4 points at the beginning of the week, and made only one purchase, now have different balances – 13, 9, 8 or 18. 1. What is going on here? Clearly and concisely explain why customers whose initial balances were the same now have different balances. 2. Are any of the 4 values "incorrect"? Briefly explain. 3. What, if anything, could be done to prevent this situation from occurring? If you wish, you may attach PDF documents and/or image files as part of your answer to this question. Please ensure that your name or userid appears on any files you attach. This question relates to transactions and concurrency. You may find it helpful to use transaction histories to explain your answers. Customers of Kim's Coffee are automatically enrolled in a loyalty scheme. Customers receive a bonus point each time they make a purchase. These are stored in Kim's database and a query is provided so that customers can see the number of points they have (their balance) at any time. To increase business and attract new customers, Kim's Coffee has two special promotions. During "Add 5" weeks, customers receive 5 bonus points instead of 1 when they make a purchase. In "Double Dip" weeks the balance of customers who make a purchase is doubled. Kim's Coffee has a transaction for each of these. • 15 reads a customer's balance, adds 5 to it, writes it back to the database and commits. • T2 reads a customer's balance, doubles it, writes it back to the database and commits. This week Kim's Coffee is offering both promotions. A customer, Lee, calls to complain. He says "I have only made one purchase this week. My points balance was 4 and now it is 13 –I think it should be more." Another customer, Alex, also complains saying "I have only made one purchase this week. My points balance was 4 and now it is 8–I didn't get my extra 5 points." Kim checks the logs and is horrified to discover that customers who had 4 points at the beginning of the week, and made only one purchase, now have different balances – 13, 9, 8 or 18. 1. What is going on here? Clearly and concisely explain why customers whose initial balances were the same now have different balances. 2. Are any of the 4 values "incorrect"? Briefly explain. 3. What, if anything, could be done to prevent this situation from occurring? If you wish, you may attach PDF documents and/or image files as part of your answer to this question. Please ensure that your name or userid appears on any files you attach.
Expert Answer:
Answer rating: 100% (QA)
Answer All the four customers whose initial points balances were 4 and have made a single p... View the full answer
Related Book For
Microeconomics
ISBN: 978-0321866349
14th canadian Edition
Authors: Christopher T.S. Ragan ,Richard G Lipsey
Posted Date:
Students also viewed these accounting questions
-
This question relates to the section Linkages Between Markets found on the www.myEconLab (www.myeconlab. com). In 1994, the Quebec and Ontario governments significantly reduced their excise taxes on...
-
For the exercises in this lesson, you may find it helpful to use a window on your calculator that has friendly x-values. A background grid may also be helpful. 1. Identify each quadratic function as...
-
This question relates to the material in the Appendix. The following table shows several methods of producing 500 rubber tires per day. There are two factors, labour and capital, with prices per unit...
-
Cooper Movie Studio Corp. makes movies and is interested in lowering its operating costs for the following year, while maintaining the high quality and appeal of its movies. Cooper's management is...
-
Write the proper sequence of activities in the design of a video rental database. (The initial ERD was shown in Figure 9.9.) The design must support all rental activities, customer payment tracking,...
-
1) If a company has fixed costs of $6,000 per month and their product that sells for $200 has a contribution margin ratio of 30%, how many units must they sell in order to break even? 2) A company...
-
What are some of the ways in which MNCs change culture?
-
Yost-Perry Industries (YPI) senior management team wants to improve the profitability of the firm by accepting the right set of orders. Currently, decisions are made using the traditional method,...
-
Kevin, Kimoko, Maggie, and Ashley have a partnership that calls for the following allocation of income: Kevin and Kimoko are the receive lump sum salary payments of $50,000 each, if there's a profit...
-
Identify the issue in the following two fact situations. Part A Beth loaned Allen $5,000. The agreement was oral. Allen commutes to a nearby city to work. Beth needs to go to the city three times in...
-
What are the types of phone numbers that companies provide for their customers to call the organization to place orders, get information, or receive service?
-
The police found marijuana and growing equipment when they searched a mans house. He was prosecuted criminally, but the federal government also sought civil forfeiture of his house, pursuant to a...
-
A turbojet is travelling at high Mach number and the ambient pressure, \(p_{\mathrm{a}}\), and temperature, \(T_{\mathrm{a}}\), are 0.5 bar and \(220 \mathrm{~K}\) respectively. It is also known that...
-
Mothercare, the buggy-tobabywear retailer, has launched a 100m rights issue to pay down debt and close up to 75 UK stores to transform the property-heavy group into a digitally led business. The...
-
Concerned with its growing gang problem, New York City passes a law making it a crime to be a member of a criminal street gang. Jose Perez is a 19-year-old citizen of Mexican descent. He is seen in a...
-
The equation of state for a certain gas is \[v_{m}=\frac{\Re T}{p}+\frac{k}{\Re T}\] where \(k\) is a constant. Show that the variation of temperature with pressure for an isenthalpic process from 1...
-
What are your thoughts on the value of IT certification? Are they worth the substantial investment in time, effort, and money to earn them? Do you currently have or plan on earning any...
-
What are the three kinds of research types? Explain each type.
-
The following table shows the demand schedule for PlayStation video games. a. Compute total expenditure for each row in the table. b. Plot the demand curve and the total expenditure curve. c. Compute...
-
Industrial Footwear Inc. uses capital and labour to produce workboots. Suppose this firm is using capital and labour such that the MPK is equal to 80 and the MPL is equal to 20. For each set of...
-
Consider the following straight-line supply curves. In each case, p is the price (measured in dollars per unit) and QS is the quantity supplied of the product (measured in thousands of units per...
-
The internal loadings at a section of the beam consist of an axial force of \(500 \mathrm{~N}\), a shear force of \(800 \mathrm{~N}\), and two moment components of \(30 \mathrm{~N} \cdot \mathrm{m}\)...
-
Determine the principal stresses at point \(A\), which is located at the bottom of the web. Show the results on an element located at this point. -0.6 m- + 0.3 m 150 kN/m
-
The wood beam is subjected to a load of \(12 \mathrm{kN}\). Determine the principal stresses at point \(A\) and specify the orientation of the element. -2 m- 201 12 kN m 25 75 mm 4 m- 300 mm 200 mm mm
Study smarter with the SolutionInn App