COSC 3380 Exam 4 (From PPT)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

45 Terms

1
New cards

After a transaction commits, the transaction can be rolled back.

a. Always

b. Sometimes

c. Never

c

2
New cards

Each example violates an ACID property. Match the property with the violation.

A transaction increases al employee salaries by 10%. Due to a system failure, increases for only half of the employees are written to the database.

a. Atomic

b. Consistent

c. Isolated

d. Durable

a

3
New cards

Each example violates an ACID property. Match the property with the violation.

A transaction withdraws $500 from account A and deposits $500 in account B. The withdrawal and deposit are written in the database, but due to a disk drive failure, the information is permanently lost.

a. Atomic

b. Consistent

c. Isolated

d. Durable

d

4
New cards

What was written?

105

5
New cards

What should be written?

105

6
New cards

What was written?

5

7
New cards

What should be written?

5

8
New cards

What was written?

92

9
New cards

What should be written?

92

10
New cards

Refer to the schedules in the above image. Use the initial values below for each question:

X

Y

Z

9

4

0

After Schedule executes, what is the value of Z?

3

11
New cards

Match the schedule type to the example schedule.

a. Serial schedule

b. Serializable schedule

c. Non-serializable schedule

a

12
New cards

A database ____ is a unit of work that is treated as a whole. It is either completed as a unit or failed as a unit.

a. commit

b. transaction

c. rollback

d. operation

b

13
New cards

In an online bank application that transfers funds from a checking account to a savings account, if a debit is made successfully from the checking account, the ____ property ensures that the corresponding credit is made to the savings account.

a. atomicity

b. consistency

c. isolation

d. durability 

a

14
New cards

In an online bank application that transfers funds from a checking account to a savings account, if a debit is made successfully from the checking account, the ____ property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither.

a. atomicity

b. consistency

c. isolation

d. durability 

c

15
New cards

In an online bank application that transfers funds from a checking account to a savings account, if a debit is made successfully from the checking account, the ____ property ensures that the changes made to each account will not be lost due to a computer failure.

a. atomicity

b. consistency

c. isolation

d. durability 

b

16
New cards

A ___ is a sequential order of database instructions for multiple transactions.

a. Path

b. Schedule

c. Query

d. Transaction

b

17
New cards

Refer to the schedule below. The initial value of B is 7 and C is 3. What is the value of A after the schedule executes?

a. 2

b. 4

c. 7

d. 8

d

18
New cards

Theorem: A Schedule is Serializable iff it’s Serializable Graph is acyclic.

Is the following graph acyclic?

a. Yes

b. No

a

19
New cards

The following is a Serializable Graph corresponding to some Schedule.

Is the Schedule serializable?

a. Yes

b. No

a

20
New cards

Concurrent transactions in a serializable schedule are isolated.

a. True

b. False

a

21
New cards

The schedule above is serializable.

a. True

b. False

a

22
New cards

Is this schedule serializable?

Yes

23
New cards

Match the schedule type with the example schedule.

a. Serial schedule

b. Serializable schedule

c. Non-serializable schedule

a

24
New cards

Match the schedule type with the example schedule.

a. Serial schedule

b. Serializable schedule

c. Non-serializable schedule

b

25
New cards

Match the schedule type with the example schedule.

a. Serial schedule

b. Serializable schedule

c. Non-serializable schedule

c

26
New cards

The schedule is serializable.

a. True

b. False

No

27
New cards

The schedule is serializable.

a. True

b. False

b

28
New cards

Which one of the schedules are strict?

a. First one

b. Second one

c. Third one

d. Fourth one

d

29
New cards

Which two-phase locking technique results in the longest wait times for concurrent transactions?

a. Basic

b. Strict

c. Rigorous

30
New cards

Several transactions can hold concurrent shared locks on the same row.

a. True

b. False

a

31
New cards

Is there a cycle in this Wait-For Graph?

Yes

32
New cards

A database administrator is updating one of the tables in the database. Which of the following techniques can prevent other database administrators from doing concurrent transactions to the same table?

a. Mirroring

b. Scoping

c. Logging

d. Locking

d

33
New cards

A ____ is a part of the concurrency system that monitors, grants, and releases locks.

a. Lock Administrator

b. Lock System

c. Lock Manager

d. Lock Optimizer

c

34
New cards

In a ____, all transactions come to a halt and remain at a standstill until one of the transactions is aborted.

a. timeout

b. deadlock

c. two-phase locking

d. locking

b

35
New cards

Which deadlock management technique automatically rolls back a transaction when a lock is not released in a fixed period of time?

a. Timeout

b. Aggressive locking

c. Data ordering

d. Cycle detection

a

36
New cards

Refer to the table and schedule below. The UPDATE statement in transaction T1 holds an exclusive lock on the Class table. With strict two-phase locking, when does the SELECT statement in transaction T2 execute?

a. Immediately after the UPDATE statement in T1 executes

b. After the ROLLBACK statement in T1 executes

c. At the same time as the UPDATE statement in T1 executes

d. The SELECT statement in T2 will never execute

b

37
New cards
38
New cards
39
New cards
40
New cards
41
New cards
42
New cards
43
New cards
44
New cards
45
New cards