100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Ch8 Questions with complete solution 2024/2025 $12.99   Add to cart

Exam (elaborations)

Ch8 Questions with complete solution 2024/2025

 2 views  0 purchase
  • Course
  • Telus
  • Institution
  • Telus

Ch8 Questions with complete solution 2024/2025 Ch. 3 Administration Transaction - correct answer The purpose of a ________ is to combine multiple SQL statements together into a scenario that would either execute all of the statements or none of them ; after begin - correct answer What is ...

[Show more]

Preview 4 out of 34  pages

  • September 24, 2024
  • 34
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • ch8
  • Telus
  • Telus
avatar-seller
flyhigher329
Ch. 3 Administration
Transaction - correct answer ✔The purpose of a ________ is to combine
multiple SQL statements together into a scenario that would either execute all
of the statements or none of them


; after begin - correct answer ✔What is missing from the below transaction?


BEGIN
UPDATE customer_account SET balance = balance - 500 WHERE
account_id = 1000;
UPDATE store_inventorySET quantity = quantity - 1WHERE store_id = 5 AND
product_name = 'Computer';
INSERT INTO customer_order(account_id, product_name,store_id,
quantity,cost) VALUES (1000, 'Computer',5, 1, 500);
UPDATE store_accountSET balance = balance + 500 WHERE store_id = 5;
COMMIT;


F.




BEGIN;
UPDATE customer_account SET balance = balance - 500 WHERE
account_id = 1000;
UPDATE store_inventorySET quantity = quantity - 1WHERE store_id = 5 AND
product_name = 'Computer';
INSERT INTO customer_order(account_id, product_name,store_id,
quantity,cost) VALUES (1000, 'Computer',5, 1, 500);

,UPDATE store_accountSET balance = balance + 500 WHERE store_id = 5; -
correct answer ✔T or F?


Each SQL statement does not need to end with a semicolon to separate each
out individually in a transaction


BEGIN;
UPDATE customer
SET company='Telus',
support_rep_id=6
WHERE customer_id = 9;
UPDATE customer
SET phone='9991112222', email='daanpeeters@gmail.com'
WHERE first_name = 'Daan'
AND last_name='Peeters';
COMMIT; - correct answer ✔Use a transaction to update the customer table
to set company to Telrus and support_rep_id = 6 where customer_id = 9. then
update customer and set the phone number = 999111222 and email =
'daanpeeters@gmail.com'
where first_name is Daan and last name is Peeters


atomicity, consistency, isolation, and durability. - correct answer ✔ACID
Properties


atomicity - correct answer ✔All changes to data are performed as if they are
a single operation. That is, all the changes are performed, or none of them
are.

,For example, in an application that transfers funds from one account to
another, the atomicity property ensures that, if a debit is made successfully
from one account, the corresponding credit is made to the other account.


consistency - correct answer ✔Data is in a consistent state when a
transaction starts and when it ends.
For example, in an application that transfers funds from one account to
another, the consistency property ensures that the total value of funds in both
the accounts is the same at the start and end of each transaction.


isolation - correct answer ✔The intermediate state of a transaction is
invisible to other transactions. As a result, transactions that run concurrently
appear to be serialized.
For example, in an application that transfers funds from one account to
another, the isolation property ensures that another transaction sees the
transferred funds in one account or the other, but not in both, nor in neither.


durability - correct answer ✔After a transaction successfully completes,
changes to data persist and are not undone, even in the event of a system
failure.
For example, in an application that transfers funds from one account to
another, the durability property ensures that the changes made to each
account will not be reversed.


D.


Atomicity requires that all SQL requests in a transaction should be fully
completed and if not, the entire transaction should be aborted. The transaction
should be viewed as a single logical unit of work that is indivisible. - correct
answer ✔Which of the following criteria is specific to the atomicity property?

, a.)In the event of system failure, no transactions that were done should be
undone.


b.)If any of the transaction parts violates an integrity constraint, the entire
transaction must be aborted.


c.)Data used in one transaction cannot be used in another transaction until the
first transaction is completed.


d.)A transaction should be treated as a single logical unit of work that is
indivisible.


C.


Atomicity requires that all SQL requests in a transaction should be fully
completed and if not, the entire transaction should be aborted. The transaction
should be viewed as a single logical unit of work that is indivisible. - correct
answer ✔Which of the following scenarios reflect the atomicity property?


a.)1. There are 50 desks available for purchase in the product table.2. In one
transaction the customer purchases 10 desks.3. In the same transaction the
customer purchases 10 desks.4. The validation check runs and sees there are
40 desks left.5. The entire transaction is reverted.


b.)
1. An HR employee updates Jeff's salary by increasing it by 2.5%.2. The
general manager updates Sally's salary by increasing it by 5%.3. The HR
employee hasn't finished the transaction yet and had gotten on a call.4. The
general manager updates Jeff's salary by increasing it by 5%.5. The HR
employee's database session timed out.6. The database reverts Jeff's salary

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller flyhigher329. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

80202 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.99
  • (0)
  Add to cart