Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 9, Problem 46CRP
Explanation of Solution
Interweaving to get $100 final balance:
- Initial balance in the account is $200.
- A balance of $100 would result if the second transaction retrieved the original amount and stored its new balance before the execution of first transaction.
- Suppose the transitions are represented as:
- T1: adding $100.
- T2: withdrawing $100.
- T3: storing the new balance of account A.
- So, the sequence of transactions followed to obtain $100 as the final balance is T2, T3, and T1. First $100 is withdrawn from the initial amount $200. Then the new balance of account A $100 is stored before adding $100 to account A.
Interweaving to get $300 final balance:
- Initial balance in the account is $200...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Computer Science
A blockchain could be considered as a state machine. Suppose a hospial with 100,000 patients, 500 physicians, 1000 nurses, and 100 adminsitrative staff is using a blockchain to keep track of its activities. Each patient has a patient ID. Each of the employees (physicians, nurses, and admins) have an employee ID. For simplicity let us assume that there are only five types of transactions: (i) New patient admitted and assignd an ID by an admin (ii) A patient is discharged by an admin (iii) A nurse takes a triage of the patient (temperature, blood pressure, etc.) and records the information(iv) A physician makes a diagnosis and prescribes medications (v) Patient is billed by an admin. Answer the following questions.
What could be the state of the hospital?
What would a transaction of type (iv) look like? (Hint: Show the type and its parameters)
If a patient with ID A67567 has been discharged (type ii), show how this transaction results in a transition to a new state?…
In a POS system, a transaction is based on items purchased by the customer. The following is an example of a customer transaction receipt, where the prices shown in the receipt are GST inclusive.
Let Tran1,Tran2 & Tran3 be three independent transactions. Where Tran1 transfers the one fourth of the A accounts fund to B account. Tran2 updates the balance of the B account by 32% & Tran3 transaction provides two third of the prior balance of the A account (before providing funds to B account) to the charity account.
Now write down the concurrent transactions according to the serial given above.
Chapter 9 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Knowledge Booster
Similar questions
- How do "read-write" and "read-only" transactions differ in their behavior?arrow_forwardFor the following scenario for a point of sale system, draw the following: • A mail order company that distributes CDs and tapes at discount prices to record club members (tells the purpose of the system). • When an order processing clerk receives an order form, she verifies that the sender is a club member by checking the MEMBER FILE. If the sender is not a member, the clerk returns the order along with a membership application form. • If the customer is a member, the clerk verifies the order item data by checking the ITEM FILE. Then the clerk enters the order data and saves it to the DAILY ORDERS FILE. • At the same time, the clerk also prints an invoice and shipping list for each order, which are forwarded to the ORDER FULFILLMENT DEPARTMENT for processing there. Answer:arrow_forwardConsider the schedule below. Here, R(*) and W(*) stand for 'Read' and 'Write', respectively. T1, T2, T3, T4 and T5 represent five transactions and ti represents a time slot. ti t2 t3 t4 t5 t6 t7 t8 t9 ti0 t11 t12 t13 t14 t15 t16 t17 t18 T1 R(A) R(B) W(A) W(B) T2 R(C) W(C) T3 R(B) R(C) W(B) W(C) T4 R(D) W(D) R(A) W(A) T5 R(C) R(A) W(C) W(A) Each transaction begins at the time slot of its first Read and commits right after its last Write (same time slot). Regarding the following questions, give and justify your answers. 3) Construct a schedule (which is different from above) of these five transactions which causes deadlock when using two-phase locking protocol. You should clearly indicate all the locks and the corresponding unlocks in your schedule. If no such schedule exists, explain why. 4) Construct a schedule (which is different from above) of these five transactions which does not cause deadlock when using two-phase locking protocol. You should clearly indicate all the locks and the…arrow_forward
- Consider the following two transactions:T13: read(A);read(B);if A = 0 then B := B + 1;write(B).T14: read(B);read(A);if B = 0 then A := A + 1;write(A). Let the consistency requirement be A = 0 ∨ B = 0, with A = B = 0 as the initial values. a. Show that every serial execution involving these two transactions preserves the consistency of the database. b. Show a concurrent execution of T13 and T14 that produces a nonserializable schedule. c. Is there a concurrent execution of T13 and T14 that produces a serializable schedule?arrow_forwardConsider a database with objects X and Y and assume that there are two transactions T1 and T2. Transaction T1 reads objects X and Y and then writes object X. Transaction T2 reads objects X and Y and then writes objects X and Y. 1. Give an example schedule with actions of transactions T1 and T2 on objects X and Y that results in a write-read conflict. 2. Give an example schedule with actions of transactions T1 and T2 on objects X and Y that results in a read-write conflict. 3. Give an example schedule with actions of transactions T1 and T2 on objects X and Y that results in a write-write conflict.arrow_forwardConsider the schedule below. Here, R(*) and W(*) stand for 'Read' and Write’, respectively. T1, T2, T3, T4 and T5 represent five transactions and ti represents a time slot. ti t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 ti17 t18 T1 R(A) R(B) W(A) W(B) T2 R(C) W(C) T3 R(B) R(C) W(B) W(C) T4 R(D) W(D) R(A) W(A) T5 R(C) R(A) W(C) W(A) Each transaction begins at the time slot of its first Read and commits right after its last Write (same time slot). Regarding the following questions, give and justify your answers. 1) Assume a checkpoint is made between ts and t6, what should be done to the five transactions when the crash happens between t15 and t16. 2) Is the transaction schedule conflict serializable? Give the precedence graph to justify your answer.arrow_forward
- A company has various rules for how payments to suppliers are to be authorized.Some payments are in response to an approved purchase order. For approved purchase orders under $5,000, the accountingclerk can immediately issue a check againstthat purchase order and sign the check. Forapproved purchase orders between $5,000and $10,000, the accounting clerk can immediately issue a check but must additionallyobtain a second signature. Payments for approved purchase orders over $10,000 alwaysrequire the approval of the accounting manager to issue the check as well as the signature of two accounting clerks. Payments thatare not covered by a purchase order that areunder $5,000 must be approved by the accounting manager and a departmental manager who will absorb the cost of the paymentinto that department’s budget. Such checkscan be signed by a single accounting clerk.Payments that are not covered by a purchaseorder that are between $5,000 and $10,000must be approved by the accounting…arrow_forwardIn the 2PL algorithm we considered, a transaction can't start until it has acquired all the locks it needs (we call this, Conservative 2PL). There is a different scheme possible, where a transaction does NOT need to wait for all its locks - it can start its transactions before all the locks have been acquired. What would be good about such a scheme, and, what would be bad? Do feel free to illustrate with a diagram.arrow_forwardWe have the following transactions with associated schedulesT1: R(A) R(B) W(A)T2: R(A) R(B) W(A) W(B)a) Give the schedule of transactions T1 and T2 that leads to a WR conflict.b) Give the schedule of transactions T1 and T2 that lead to RW conflict.c) Give the schedule of transactions T1 and T2 that leads to a WW conflict.d) For each of the given schedules, show how a strict 2FZ would prevent this.arrow_forward
- Draw an ER diagram using Cardinality Notation for the following description: A veterinary hospital only treats dogs and cats (use ISA). Clients have an address, phone number and client ID. Each pet has a name, a pet ID and belongs to exactly one client. Each client can have at most 5 cats and 2 dogs.arrow_forwardWhen a transaction is aborted, we have said that the world is restored to its previous state, as though the transaction had never happened. We lied. Give an example where resetting the world is impossible.arrow_forwardConsider the three transactions T1, T2, and T3, and the schedules S1 and S2 given below. Transaction T1: r1(x); r1(z); w1(x) Transaction T2: r2(z); r2(y); w2(z); w2(y) Transaction T3: r3(x); r3(y); w3(y) Schedule S1: r1(x); r2(z); r1(x); r3(x); r3(y); w1(x); w3(y); r2(y); w2(z); w2(y) Schedule S2: r1(x); r2(z); r3(x); r1(z); r2(y); r3(y); w1(x); w2(z); w3(y); w2(y) Draw the serializability (precedence) for S1 and S2 and state whether each schedule is conflict serializable. Write down the equivalent serial schedule(s) if a schedule is serializable. Please clear answer ...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