Define the dangers of the sequence of statements

Assignment Help Computer Engineering
Reference no: EM1335644

Consider the following relational database schema:

CREATE TABLE ACCOUNTS
(
account_no char(12),
amount money,
CONSTRAINT PK_ACCOUNTS PRIMARY KEY(account_no)
)

CREATE TABLE PENDING_TRANSFERS
(
from_account_no char(12),
to_account_no char(12),
amount money,
CONSTRAINT PK_ PENDING_TRANSFERS PRIMARY KEY(from_account_no,
to_account_no),
CONSTRAINT FK_PENDING_TRANSFERS_FROM_ACCOUNT
FOREIGN KEY(from_account_no) REFERENCES ACCOUNTS(account_no),
CONSTRAINT FK_PENDING_TRANSFERS_TO_ACCOUNT
FOREIGN KEY(to_account_no) REFERENCES ACCOUNTS(account_no),
)

(a) Write three SQL statements: the first statement should add the pending amounts to the appropriate accounts, the second statement should subtract the pending amounts from the appropriate accounts, and the third statement should delete the pending balance transfer information.

(b) Explain the dangers of the sequence of statements in part (a) above, in terms of what would happen in case the database server or SQL interface were to crash in between two of these three statements.

(c) Show how to remove the dangers you described in part (b).

Reference no: EM1335644

Questions Cloud

Slander and libel : Which of the following is slander rather than libel? A defamatory statue. A defamatory TV broadcast.
Organizations multiple stakeholders : Please give an example of a business process where the interests of two (or more) stakeholders are in opposition.
Effective and successful project risk management : What can be done to ensure effective and successful project risk management? Please explain, provide examples.
Ethical obligations : In 200-300 words, describe three ethical obligations of a defense attorney and three ethical obligations of a prosecuting attorney.
Define the dangers of the sequence of statements : Write down three SQL statements: the first statement should add the pending amounts to the appropriate accounts, the second statement must subtract the pending amounts from the appropriate accounts, and the third statement should delete the pending..
Scope creep and feature creep kill a project : How can scope creep and feature creep kill a project?
Give general information satyam : Give general information satyam
Apparent authority and liability : What is apparent authority and its resulting liability?
Accommodate different languages : Accommodate different languages.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Distinguish between open and closed applications.

explain  HTML, XML and Java programming. What is the difference between the three.

  Make a perl script that accepts the name of directory

build a Perl script that accepts the name of directory as an argument to the script, and lists out the files in this directory that are older than 2 hours from the time the script is executed.

  In short define asynchronous communications

express packet switching and the benefits of packet switching. What are examples of packet switching networks.

  Define the quicksort algorithm to sort vector v

define the quicksort algorithm to sort vector v. During each pass, list all exchanges of a pair of elements in the lower and upper sublist.

  Make a third single dimension array to hold a sum

design a third single dimension array to hold a sum. Your main program will take the two arrays of float and pass them to the function addfloat() Inside the function, add the first array to the second array and put the total into the third array. ..

  Compare productivity based solutions

Microsoft has expended a lot of effort into developing productivity tools for the Web, particularly with the .NET strategy. though, there are many other tools for creating Web solutions.

  Why is the documentation plan important

What are three essential system components that may be used to devise an implementation strategy in your workplace.

  Can a relation be stored as a sequential file

Can a relation be stored as a sequential file

  How many cars in every team called chevy and ford

How many cars in every team called Chevy and Ford There are eight cars in every team called Chevy and Ford. One car from each team races its opponent on drag strip.

  Describe the use of queries in an ehr

define a query that you would use as a continuous tool in an EHR.

  What are two processes of conserving ip addresses

How are default subnet masks determined.What are two processes of conserving IP addresses? Explain these methods.

  How do they differ from the tools you use

What tools do you find most useful in managing projects

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd