Database Final, Database Systems Exam 4 Practice

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/173

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

174 Terms

1
New cards

A __________ statement erases saved data for exactly one savepoint

RELEASE SAVEPOINT

2
New cards

The concurrency control protocol in which transactions hold their exclusive locks until commit is called

Strict two-phase locking

3
New cards

Two transactions run in parallel to set an account's balance to different values

Isolated

4
New cards

8. Deadlock can occur in a serializable schedule

False

5
New cards

10. All of the following signal an end of a transaction EXCEPT

SAVEPOINT

6
New cards

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

Rigorous

7
New cards

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

Atomic

8
New cards

A transaction saves a row with a foreign key. The foreign key is not NULL and does not match any values of the corresponding primary key.

Consistent

9
New cards

Two transactions running in parallel reserve the same seat for different passengers

Isolated

10
New cards

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.

Durable

11
New cards

15. One transaction can hold an exclusive lock while other transactions hold shared locks on the same row

False

12
New cards

16. B and C are ________ schedules (just solve for Z until Z commit)

conflicting

13
New cards

17. In recovery techniques ________ requires that the effects of a committed transaction be permanent, so they must survive the loss of main memory, loss of disk storage, and failures during data transfers to disk.

durability

14
New cards

19. For a schedule to be serializable it must

produce the same result as an actual serial execution

15
New cards

21. Checkpoints can be initialized either manually by the database administrator or automatically by the database

True

16
New cards

Assume existence of user Assistant Manager assistant. What privilege should you grant to assistant who needs to know only average department salaries? GRANT ____ ON DeptInfo TO assistant

SELECT

17
New cards

23. Each of the following is a well-known concurrency control problem EXCEPT

the redundant data problem

18
New cards

24. After a rollback, the database restarts a transaction:

Sometimes

19
New cards

25. A ___________ statement reverses all changes made by a transaction

ROLLBACK

20
New cards

26. A __________ statement temporarily saves data read and written by a transaction

SAVEPOINT

21
New cards

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

True

22
New cards

29. For unknown reasons, an application program freezes. The data administrator forces termination and restarts the application

System failure

23
New cards

35. A database uses strict two-phasing locking. Transaction A takes an exclusive lock on X. Transaction B requests a shared lock on X. When is the shared lock granted?

After A commits or rolls back

24
New cards

37. A transaction with isolation level SERIALIZABLE can participate in a deadlock

True

25
New cards

39. A list of active transactions appear in a(n) ________ record

checkpoint

26
New cards

A bank stores checking account data in a database. The bank stores account owner data in a file on a different computer. A database transaction creates a new owner in the file and assigns the owner to a checking account in the database: The transaction is always isolated

False

27
New cards

A developer wishes to link to a database with a utility created in C. Which MySQL component does the developer use for the link?

API

28
New cards

42. Which MySQL layer interacts directly with database users and administrators?

Tools

29
New cards

43. Which MySQL component retains data blocks from storage in main memory for possible reuse?

Buffer manager

30
New cards

44. A document that sequentially writes all the database operations is known as a/an ______.

recovery log

31
New cards

A database admin uses a SHOW statement to retrieve information about objects in a database. This information is contained in a ____.

data dictionary

32
New cards

46. In the query processor layer, the query optimizer generates a/an ______.

execution plan

33
New cards

47. A recovery system should manage which three failure scenarios?

Transaction failure, System failure, and Storage media failure

34
New cards

48. In MySQL, which of the following SQL operations always commits immediately?

CREATE

35
New cards

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

Lock Manager

36
New cards

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

durability

37
New cards

51. Which isolation level prevents dirty, non-repeatable, and phantom reads?

Serializable

38
New cards

52. When using the MySQL Workbench GUI, which icon will execute an SQL statement?

Lightning bolt

39
New cards

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

deadlock

40
New cards

57. ____ allows all executed database instructions to be rolled back and to be restored in a prior transaction state.

SAVEPOINT

41
New cards

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

Timeout

42
New cards

60. When using the MySQL Command-Line Client, which character ends a command?

; (semi-colon)

43
New cards

Phases in recovery using the ARIES method include all of the following EXCEPT

synthesis

44
New cards

Verifying the identity of a user is called

authentication

45
New cards

With a cold backup, recovery from storage media failure reads the log:

From the latest checkpoint

46
New cards

A ___ statement reverses all changes made by a transaction

ROLLBACK

47
New cards

two transactions run in parallel to set an account's balance to different values

isolated

48
New cards

A _________ statement erases saved data for exactly one savepoint

release savepoint

49
New cards

which of the following is NOT true of the two-phase locking protocol?

it eliminates the problem of deadlock

50
New cards

during the undo phase, the recovery system reads the log in reverse and stops at:

The start record for the last transaction in the active transaction list

51
New cards

CHECKPOINT statement syntax is specified in the SQL standard

False

52
New cards

A dirty block is a block that has been corruped and cannot be read

False

53
New cards

A database using strict two-phase locking Transaction A takes an exclusive lock on X transaction B requests a shared lock on X. When is the shared lock granted?

After A commits or rolls back

54
New cards

Database availability is:

Percentage of time that a databse is responsive to application programs

55
New cards

After a rollback, the database restarts a transaction:

Sometimes

56
New cards

The ______ schedule has the same result as schedule

Equivalent

57
New cards

When a transaction deletes a table row, an _________ record is written in the log

update

58
New cards

A _____ statement temporarily saves data read and written by a transaction

savepoint

59
New cards

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

Rigorous

60
New cards

All of the following are security tools EXCEPT

constraints

61
New cards

After a transaction commits, a transaction can be rolled back

NEVER

62
New cards

Each is a well known concurrency control problem EXCEPT

the redundant data problem

63
New cards

MySQL innoDB

False

64
New cards

how many sql statement in one transaction?

at least one

65
New cards

buffer manager retains _ from the _ to reduce data access time

data blocks, file system

66
New cards

which isolation level dirty reads

read uncommited

67
New cards

mySQL community edition create database full control mySQL

Root

68
New cards

A _ is a sequential order of database instructions for multiple transactions

Schedule

69
New cards

Username password is incorrect so web app cannot connnect to databse which failure scenario>

Transaction failure

70
New cards

Document sequentially write databse operations

recovery log

71
New cards

icon execute sql statement

lightning bolt

72
New cards

a database _ is a unit of work that is treated as a whole

transaction

73
New cards

link databse to utility in C

API

74
New cards

recovery technique that creates a nearly synchronized backup of the primary databse

Hot Backup

75
New cards

mysql layer interacts directly with databse users and administrators

Tools

76
New cards

SQL component retains data block from storage in main memory for reuse

buffer manager

77
New cards

Which options in schemas tab

list of available databases

78
New cards

incorrect mysql synthax mySQL workbench

Error code

79
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.

atomicity

80
New cards

monitor grant release locks

Lock manager

81
New cards

A(n) ________ record always appears in the log at the beginning of a transaction.

Transaction or Start

82
New cards

With a hot backup, as a transaction executes against the primary database

Log records are sent to the secondary database

83
New cards

A _________ statement erases saved data for zero, one, or many savepoints.

ROLLBACK TO

84
New cards

Match the schedule type to the example schedule

T1 T2

read X

Y = X +4

write Y

commit

read X

X = X / 8

write X

commit

Serial Schedule

85
New cards

Phases in recovery using the ARIES method include all of the following EXCEPT

synthesis

86
New cards

A __________ statement temporarily saves data read and written by a transaction

SAVEPOINT

87
New cards

After a rollback, the database restarts a transaction

Sometimes

88
New cards

Select the ACID property violated in the following example:

Two transactions run in parallel to set an accounts balance to different values.

Isolated

89
New cards

Deadlock can be spotted by looking for which of the following in the wait-for graph?

a cycle

90
New cards

A bank stores checking account data in a database. The bank stores account owner data in a file on a different computer. A database transaction creates a new owner in the file and assigns the owner to a checking account in the database.

The transaction is always isolated.

False

91
New cards

Select the failure scenario that best describes the example:

The database detects two deadlocked transactions. To break the deadlock, the database rolls back one of the transactions.

Transaction failure

92
New cards

A graphical depiction of the execution sequence of transactions is called a

Schedule

93
New cards

When two READ UNCOMMITTED transactions run concurrently, the result may vary.

True

94
New cards

Transactions A and B are both SERIALIZABLE, and A always starts before B. The results may vary.

False

95
New cards

How many SQL statements must be in one transaction?

At least one

96
New cards

T2 reads some accounts

T2 reads remaining accounts

T1 computes the largest account

T1 pays CEO 1% of largest account

T1 commits

T2 computes the average account size

T2 pays executives 1% of average account size

T3 deletes account A

T3 commits

T2 commits

Given the above set of transactions complete the following statement:

T3 executes ___________.

without a conflict

97
New cards

For unknown reasons, an application program freezes. The data administrator forces termination and restarts the application

System failure

98
New cards

After all updates have been reversed in a rollback, a(n) __________ record is written in the log.

Rollback or Transaction

99
New cards

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

True

100
New cards

Which two-phase locking technique has, in effect, just one phase?

Rigorous