dbm exam 3 - concurrency

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/58

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.

59 Terms

1
New cards

What is the difference between data administration and database administration?

One is a function applying to an entire organization, the other is specific to a particular database.

2
New cards

database administration tasks

  • manage database structure

  • control concurrent processing

  • manage processing rights and responsibilities

  • develop database security

  • provide for database recovery

  • manage the DBMS

  • maintain the data repository

  • participate in database and application development

  • facilitate changes to database structure

3
New cards

index

secondary structure in a physical database design that can speed up access to data for certain types of queries

4
New cards

Does the DBA need to understand the physical database design?

Yes, it informs their understanding of DBMS performance and they may be able to influence replication levels of data.

5
New cards

Disk mirroring

A physical database design strategy that maintains two copies of data.

6
New cards

RAID

A physical database design strategy that keeps redundant arrays of independent disks.

7
New cards

query optimizer

evaluates ways to execute a query, picks the fastest one using indices

8
New cards

What does concurrency control protect against?

One user’s work inappropriately influencing another user’s work (race condition).

9
New cards

transaction

a logical unit of work

10
New cards

atomic

either all of it happens, or none of it does

11
New cards

What is COMMIT?

TCL keyword that makes all statements of the transaction permanent.

12
New cards

What is ROLLBACK?

TCL keyword that undoes the entire transaction according to the log.

13
New cards

implicit lock

locks placed by the DBMS

14
New cards

explicit lock

locks placed by the application program

15
New cards

What is the most common type of locking in database systems today?

implicit locking

16
New cards

_ granularity is easy to manage, but frequently causes conflicts.

large

17
New cards

_ granularity is hard to manage, but conflicts are less common.

small

18
New cards

exclusive lock

prohibits other users from reading the locked resource

19
New cards

shared lock

allows other to read, but not update

20
New cards

serializable transactions

2 transactions that run concurrently and generate the same results as if they had run separately

21
New cards

_ is used to achieve serializability.

two-phase locking

22
New cards

growing phase

transactions are allowed to obtain locks as necessary

23
New cards

shrinking phase

once the first lock is released, no other lock can be obtained

24
New cards

strict two-phase locking

locks are obtained throughout the transaction, no lock is released until COMMIT or ROLLBACK is issued

25
New cards

Why might someone use strict two-phase locking?

It’s easier to implement.

26
New cards

What are some ways to prevent deadlock?

  • allow users to issue all lock requests at one time

  • require all application programs to lock resources in the same order

27
New cards

What does a DBMS do when deadlock occurs?

It aborts one of the transactions and rolls back partially completed work.

28
New cards

optimistic locking

assumes no transaction conflict will occur

29
New cards

What kind of locking is a DBMS that processes a transaction and checks whether a conflict occurs afterwards practicing?

optimistic

30
New cards

What kind of locking is a DBMS that issues locks during a transaction practicing?

pessismistic

31
New cards

What does ACID stand for?

Atomic, Consistent, Isolated, Durable.

32
New cards

durable

database committed changes are permanent

33
New cards

statement-level consistency

each statement independently processes rows consistently

34
New cards

transaction-level consistency

all rows impacted by the transaction are protected from changes during the entire transactions

35
New cards

transaction isolation levels

  1. read uncommitted

  2. read committed

  3. repeatable read

  4. serializable

36
New cards

dirty read

The transaction reads a row that has been changed, but the change has not been committed.

If the change is rolled back, the transaction has incorrect data.

37
New cards

nonrepeatable read

The transaction rereads data that has been changed and finds updates or deletions due to committed transactions.

38
New cards

phantom read

The transaction rereads data and finds new rows inserted by a committed transaction since the prior read.

39
New cards

What consistency problems are possible at a read uncommitted isolation level?

dirty read, nonrepeatable read, phantom read

40
New cards

What consistency problems are possible at a read committed isolation level?

nonrepeatable read, phantom read

41
New cards

What consistency problems are possible at a repeatable read isolation level?

phantom read

42
New cards

What consistency problems are possible at a serializable isolation level?

none

43
New cards

cursor

pointer into a set of rows

44
New cards
<p>What is the above code doing?</p>

What is the above code doing?

Creating an SQL cursor.

45
New cards

SQL GRANT and REVOKE are keywords granting permissions in what language?

SQL Data Control Language

46
New cards

SQL Injection Attack

occurs when a user inputs data that can modify an SQL statement

47
New cards
<p>What is the above code doing?</p>

What is the above code doing?

Outputs every single row as a result of a SQL injection attack.

48
New cards

Why is recovery via reprocessing unfeasible?

The recovered system may never catch up if the computer is heavily scheduled.

49
New cards

rollback

undo erroneous changes, reprocess only valid transactions

50
New cards

rollforward

restore database using saved backup and apply valid transactions since the last save.

51
New cards
<p>What is this an example of?</p>

What is this an example of?

rollback recovery

52
New cards
<p>What is this an example of?</p>

What is this an example of?

rollforward recovery

53
New cards

What is a checkpoint?

A point of synchronization between the database and the transaction log.

The DBMS refuses new requests, finishes processing requests, and writers to disk.

54
New cards

A _ marks a point within a transaction for rollback and is user-initiated.

savepoint

55
New cards

A _ ensures data consistency in case of failure, writes to disk, tries to finish ongoing transactions, and is automatic.

checkpoint

56
New cards

data repository

collection of metadata about users in a database

57
New cards

Who maintains the data repository?

DBA

58
New cards

What does it mean for a data repository to be active?

It’s part of a system’s development process.

59
New cards

What does it mean for a data repository to be passive?

Documentation is only made when someone has time.