Week 12 Part 2 Flashcards

1
Q

This stores multiple copies of a dataset on multiple nodes

A

Replication (the copies are called replicas)

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

What does replication provide?

A

Scalability and availability

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

The redundancy achieved through replication leads to _____ tolerance

A

fault tolerance

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

What are the 2 methods used to implement replication?

A

Master-slave

peer-to-peer

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

Master-slave replication: All data is written to a master node, what happens?

A

The slave nodes replicate the data

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

Master-slave replication: Where do write requests like insert, delete, and update occur? Where do read requests occur?

A

Write requests: Master
read requests: Slave

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

Is master-slave replication ideal for write intensive loads or read intensive loads? Why?

A

Read intensive loads. The system can be scaled horizontally by adding more slave nodes.

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

What happens to the master slave replication system when the amount of writes increases?

A

The system suffers. There’s only 1 master node.

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

T/F - If the master node fails, reads are no longer possible

A

False, can read from any slave node

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

T/F - A salve node can be configured as a backup for the master node

A

True

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

T/F - If the master node fails, writes are no longer possible

A

True, until a master node is reestablished

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

T/F - master node is either resurrected from a backup of the master node, or a new
master node is chosen from the slave nodes

A

True

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

T/F - In peer to peer, one node writes, the other reads

A

False

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

T/F - In P2P each write is copied by all peers

A

True

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

Name this ACID principle: ensures that all operations will always succeed or fail
completely (no partial transactions)

A

Atomicity

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

Name this ACID principle: ensures that the database will always remain in a consistent
state by ensuring that only data that conforms to the constraints of the
database schema can be written to the database

A

Consistency

17
Q

Name this ACID principle: ensures that the results of a transaction are not visible to other
operations until it is complete

A

Isolation

18
Q

Name this ACID principle: ensures that the results of an operation are permanent. In other
words, once a transaction has been committed, it cannot be rolled back.
This is irrespective of any system failure

A

Durability

19
Q

A user updates 3 records. 2 are successful, the 3rd one fails. The entire system is rolled back before the update. Why?

A

Atomicity

20
Q

User tries to update a column with a datatype of float with a varchar value. The DB rejects this update. Why?

A

Consistency

21
Q

user A attempts to update 2 records, the DB updates the first one, but User B tries to update the 2nd record at the same time. User B cannot update the 2nd record. Why?

A

Isolation (must wait until User A’s update succeeds or fails)

22
Q

A user updates a record, the DB updates it. Right after this there is a power failure but the DB maintains its state. When the power comes back on the record is still there, why?

A

Durability