quiz 3 - week 9 content Flashcards

1
Q

A transaction comprises a unit of ___ ___

Transactions take the database from one ___ ___ to the next ___ ___

in Oracle databases a transaction implicitly begins with the ______________________

Issuing either a _____ or ____ statement explicitly ends a transaction

A

database work

consistent state, consistent state

in Oracle databases a transaction implicitly begins with the first statement that modifies data

commit or rollback

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When you issue a COMMIT, you are assured that :

all of your changes have been ___ ___

that any data ___ ___ and ___ have been validated

A

successfully saved

integrity checks, rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does rollback do

A

ends transaction
undo any uncommitted changes

is an undo button

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

savepoint

rollback to

SET TRANSACTION:

A

savepoint- creates a marked poiint

rollback to - rolls back transactions to the marked point without rolling back any of the work that preceded it

allows you to set various transaction attributes, such as the transaction’s isolation level and whether it is read-only or read-write.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

atomicity
a transaction is atomic if it __________________ or __________________

DDL are implemented in a manner that:
1
2
3

A

succeeds as a whole
fails as a whole

commit outstanding work, ending a transactions in place.
perform DDL
Commit DDL, roll back if failed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

consistency
should not introduce ___ ___ to the database

tools to minimize data inconsistencies

____________

A

wrong data

tabular structure, data types, constraints

3rd normal form

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

1nf
2nf
3nf

A

atomic, unique pk

non-key columns are fully functionally dependent on the pk

every non-key column must depend only on the primary key, not on another non-key column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

__________-Is the contract between the database and the user that
states that a transaction is stored in the database when it is
completed no matter what happens (even if the system will
fail)

A

durability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

___________- * Every transaction has to be dealt with in isolation even if
the transactions are concurrent

  • For example there should be a mechanism that allows to
    resolve the conflicts arising from multiple users updating
    same data at the same time
A

isolation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Whenever an INSERT, UPDATE or DELETE statement is issued, the data is not immediately sent to the table but, rather, is temporarily stored in the ___ __

When the user issues a SELECT statement to view the data, data from the table is combined with the data from the buffer before presenting it to the user and the
user thinks that the data has been inserted

Other users, however, do not see the data. Locks prevent users from ___________________ when they are simultaneously making changes and so are very
important

A

user’s buffer.

destroying each other’s data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

___ are acquired when any process accesses a piece of data where there is a chance that another concurrent process will need this piece of data as well at the same time. By locking the piece of data we ensure that we are able to action on that data the way we expect.

  • ____ occur when two processes need access to same piece of data concurrently so one process locks the data and the other one needs to wait for the other one to complete and release the lock. As soon as the first process is complete, the blocked process resumes operation. The blocking chain is like a queue: once the blocking process is complete, the next processes can continue.
  • _____ occurs when one process is blocked and waiting for a second process to complete its work and release locks, while the second process at the same time is blocked
    and waiting for the first process to release the lock
A

Locks

blocks

Deadlock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

you can save part of a transaction t/f

A

f
You can not save part of the transaction to the database. It will either be saved as a whole or none of the modifications will be saved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A transaction is defined as all the _________________

A

DML statements that are placed between two COMMITs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A ___ ___ occurs when a transaction reads data that another transaction has modified but not yet committed. If the other transaction is rolled back, the first transaction is left with incorrect data

A __________ happens when a transaction reads the same data twice but finds it has changed between the two reads due to another transaction’s update

___ ___ occur when a transaction reads a set of rows that satisfy a condition, but another transaction inserts or deletes rows that meet the same condition, causing the result set to change upon a re-read

A

dirty read

non-repeatable read

Phantom reads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

4 isolation levels

_______:
* Allows a transaction to read data that has been modified by other transactions but not yet
committed.

__________:
* A transaction can only read data that has been committed by other transactions.

__________:
* Ensures that if a transaction reads a set of rows, it will see the same set of rows throughout the entire transaction.

___________:
* Provides the highest level of isolation.
* Ensures complete isolation between transactions, preventing any interference

A

READ UNCOMMITTED
READ COMMITTED
REPEATABLE READ
SERIALIZABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Read Uncommitted Allows:

Read Committed Allows:

Repeatable Reads Allows:
Serializable ___

A

Dirty Reads, Non Repeated Reads, and Phantom Reads

Non Repeated Reads, and Phantom Reads

Phantom Reads

Does not allow any of the three reads