EBK COMPUTER SCIENCE: AN OVERVIEW
12th Edition
ISBN: 8220102744196
Author: 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?…
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.
How do "read-write" and "read-only" transactions differ in their behavior?
Chapter 9 Solutions
EBK COMPUTER SCIENCE: AN OVERVIEW
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
- For 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_forwardConsider 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_forward
- Consider 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_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_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_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_forwardPrimeVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. PrimeVideo can own several copies (VIDEO) of each movie (MOVIE). For example, a kiosk may have 10 copies of the movie Twist in the Wind. In the database, Twist in the Wind would be one MOVIE, and each copy would be a VIDEO. A rental transaction (RENTAL) involves one or more videos being rented to a member (MEMBERSHIP). A video can be rented many times over its lifetime; therefore, there is an M:N relationship between RENTAL and VIDEO. DETAILRENTAL is the bridge table to resolve this relationship. The complete ERD is provided in the figure. Write the SQL code to create the table structures for the entities shown in the figure. The structures should contain the attributes specified in the ERD. Use data types (and lengths, if applicable) that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD. Make…arrow_forward
- Consider the following two transactions: T1 = R(A). W(A), R(B), R(C) T2 - W(C). R(B), R(A). W(B) Say that sharing lock, exclusive lock, and unlock actions are inserted by the scheduler, resulting in the following annotated transactions: T1 - X(A), R(A), W(A), S(B), R(B), S(C), U(A), R(C), U(B), S(C) T2 - X(C), W(C), X(B), S(A), U(C), R(B), R(A), U(A), W(B), U(B) The above schedule follows 2 PL so conflict serializability is guaranteed. O True O Falsearrow_forwardA new timestamp will be applied to a transaction in line with the ordering of timestamps if that transaction is rolled back. Why is it that it can't just keep the timestamp that it had before?arrow_forwarda. Which itemsets (of any length) are frequent if you know that {ace} and {ad} are the only maximal frequent itemsets? b. If all transactions that contain {bcd} also contain {def}, which of the following itemsets {bcd}, {def}, {bcde}, {bcdf}, {bcdef} are not closed?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