Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Program A and Program B, below, are running at the same time. Each is three instructions long, and each instruction happens one time in

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed 4. Program A and Program B, below, are running at the same time. Each is three instructions long, and each instruction happens one time in the appropriate order for that program; however, the programs might be interleaved, i.e. swap back and forth between the next A instruction and the next B instruction. Initially, the value of Carole's balance in the database is 300 . Show a way to interleave the two programs so that each program executes its three instructions once each, in the correct order, but in the end Carole's balance is 375 . 6. Below are two programs, C and D, which are running simultaneously in a database. Program C transfers 100 from Alice's balance to Bob's balance, while program D transfers 50 from Bob's balance to Alice's balance. Because of the locks, interleaving these programs cannot create inconsistencies in the balance amounts. All of the instructions in these program are written to be reversible, i.e. it is possible to run a program backwards from any point to undo it. Describe how programs C and D could get into a situation where the database has to back out of one or both of them. 7. Consider a database with these excerpted Authors and Awards tables, with information about the works that have won the Hugo Award for Best Novel. Authors Awards A. What is an interesting question that could be answered from the Authors table alone? B. What is an interesting question that could be answered from the Awards table alone? C. What is an interesting question that would require these tables to be joined to compute the answer? D. What columns would be used as keys for the join operation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bears Of The World Ecology Conservation And Management

Authors: Vincenzo Penteriani, Mario Melletti

1st Edition

1108483526, 978-1108483520

More Books

Students also viewed these General Management questions