1.3.2 A2 Referential Integrity Flashcards

1
Q

Referential Integrity

A

The process of ensuring that changes remain consistent. If a record is removed, all references to it are removed.

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

Transaction

A

A single operation executed on data. (a collection of operations can also sometimes be considered a transaction).

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

What does ACID stand for?

A

Atomicity, Consistency, Isolation, Durability

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

Atomicity

A

A transaction must be processed in its entirety or not at all

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

Consistency

A

A transaction must maintain the referential integrity rules between linked tables

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

Isolation

A

Simultaneous executions of transactions should lead to the same result as if they were executed one after the other

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

Durability

A

Once a transaction has been executed, it will remain so regardless of the circumstances surrounding it, such as in the event of a power cut.

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

Record Locking

A

Preventing simultaneous access to records in a database.

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

What problems does record locking prevent?

A

Inconsistencies, or a loss of updates.

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

How would record locking work?

A

While one user is editing a record, the record is locked so it cant be accessed by others.

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

What is the biggest problem with record locking?

A

Deadlock.

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

Explain dead lock through an example

A

User 1 accesses Customer 1’s record, which locks it.

User 2 accesses Customer 2’s record, which locks it.

User 1 tries to access Customer 2’s record. User 2 tries to access Customer 1’s record.

User 1 waits for Customer 2’s record to be free. User 2 waits for Customer 1’s record to be free.

There is no progress, causing a deadlock.

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

What is redundancy? (the good version)

A

Having one or more copies of data in physically different locations.

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

What is good about redundancy?

A

If there is damage to one copy of data, the other copies are unaffected and can be recovered.

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

What is redundancy? (the bad version)

A

The unnecessary repitition of a field in multiple tables.

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