Explain the dangers of the sequence of statements

Assignment Help Database Management System
Reference no: EM13949403

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: EM13949403

Questions Cloud

Compute the per-unit gross margin for each product : Verify the overhead cost per unit reported by the consulting group using direct labor hours to assign overhead. Compute the per-unit gross margin for each product.
Review financials for childrens hospital of orange county : After creating and/or reviewing the financials for Children's Hospital of Orange County (CHOC), does it appear that your company can become successful (or will remain successful for the long run)? Please explain the reasons for your response.
About the wording or tone that gives you a clue : Author's purpose: Is the author's purpose to enlighten, inspire, inform, persuade, argue, report, describe, or something else (or some combination)? What does the author want the reader to think, do, feel, or know?
Also calculate the end of august : The employment to population ratio, Also calculate the end of August 2007:
Explain the dangers of the sequence of statements : 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.
What is the materials price variance, and is it favorable or : In 2015, Mitchell actually produced 5,000 units of product. Mitchell spent $497,250 on 25,500 pounds of DM (all of these materials were requisitioned by the production department in 2015). Mitchell spent $194,750 on 9,500 DL hours. What is the materi..
Which dividends are expected to grow at rate : Huang Company's last dividend was $1.25. The dividend growth rate is expected to be constant at 30% for 3 years, after which dividends are expected to grow at a rate of 6% forever. If the firm's required return (r) is 11%, what is its current stock p..
Described the challenges you would face in policing : For this assignment assume that you are a new chief of police or sheriff in an area adjacent to a large tribal area. In a 5 to 7 page APA formatted paper described the challenges you would face in policing along side Native Americans
Fred needs to start : Fred needs to start saving for retirement

Reviews

Write a Review

 

Database Management System Questions & Answers

  Determine the total amount of supervisory wages

Determine the total amount of supervisory wages and factory utilities costs that would NOT be assigned to products.

  Can you say that attribute b defnitely is or is not a key

State the defnition of a lossless-join decomposition with respect to this example. Answer this question concisely by writing a relational algebra equation involving R, R1, and R2.

  Various kinds of keys to form or define relationships

Relational database is based on fact that data in one table can be tied, or related to data in another table. To do this, database utilizes various types of keys to form or define these relationships.

  High-level conceptual view of a data warehouse

Design a high-level conceptual view of a data warehouse (DW) for Huffman Trucking using Microsoft Visio that shows the Integration layers.

  Logical development of appropriate data types

Demonstrate professional presentation skills by the development of a professional business presentation to the client outlining the development process for this Database Management System project.

  Why a relation schema is an indexed set of sets

Why the states of a relation schema are the subsets of schemas product? Please give an example?

  Scanner object associated with standard input

Assume that name1, name2, and name3 have been declared and use them in your code. Assume also that stdin is a variable that reference a scanner object associated with standard input.

  Calculate the total cost for each event

Find all maincourses that have not been served at wedding receptions. List out the description - Calculate the total cost for each event - Find all maincourses that have not been served at wedding receptions. List out the description.

  What dbms component is responsible for concurrency control

Describe the three most common problems with concurrent transaction execution. Explain how concurrency control can be used to avoid those problems. What DBMS component is responsible for concurrency control? How is this feature used to resolve conf..

  Implement an access database

They have asked you to implement an Access database so they can add, modify and delete data as well as generate queries and reports based on the information contained in the database

  How can you drop a table from your database that has one or

how can you drop a table from your database that has one or more other tables referencing it with foreign keys?no words

  Logical database design - conceptual database design

Draw the corresponding GRD, exhibiting all the primary keys and foreign keys. For simplicity, no other attributes nor multiplicity constraints are required.

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