DDC Flashcards

1
Q

Transaction

A

Logical unit of work that completes in its entirety or not at all, with the aim of keeping the database consistent.

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

Dirty Read problem

A

when one transaction updates an item of the database,
and somehow the transaction fails, and before the data gets rollback,
the updated database item is accessed by another transaction.

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

Inconsistent analysis

A

When one user is reading values while another is updating values, resulting in a mix of old and new values being shown.

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

Lost update

A

Two transactions perform read/write operations at the same time, resulting in the second commit overriding the first

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

ACID properties of a transaction

A

Atomicity- completes in its entirety or not at all
Consistency- database must remain in a consistent state
Isolation- transactions must be executed independently of each other
Durability - changes made by transaction must persist

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

OLTP (Online transaction processing)

A

Real time access to data to either read or modify it

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

OLAP (Online analytical processing)

A

Alternative to OLTP, which involves fewer, more intense transactions

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

Problems with transactions

A
  • Serially running transactions will fix this, however if only one transaction run at once then we would face a lot of problems
  • Read operations can be run in parallel
  • If a transaction is writing to one part of the DB, it can still access other parts unaffected by the update
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Two Phase Locking

A

Unlocks operations only performed after all locks have been acquired.

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

Deadlock

A

two transactions waiting for each other to release a lock

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

Clustered index

A
  • Controls how data is stored on a disk.

- As rows can only be stored in one order, there can only be one clustered disk per table.

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

Non clustered index

A

They contain the pointer to the row itself, the pointer is aka the row locator

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