Databases Flashcards

(15 cards)

1
Q

When referring to databases, what does it mean to be ACID-compliant?

A

Database operations that adhere to the properties of Atomicity, Consistency, Isolation, and Durability

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

What does it mean for database operations to adhere to Atomicity properties?

A

A transaction is treated as a single, indivisible unit of work; either all changes within the transaction are committed, or none are.

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

What does it mean for database operations to adhere to Consistency properties?

A

The database remains in a valid state after each transaction, meaning that all data constraints and rules are followed.

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

What does it mean for database operations to adhere to Isolation properties?

A

Transactions are executed independently, preventing interference or conflicts between concurrent transactions.

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

What does it mean for database operations to adhere to Durability properties?

A

Once a transaction is committed, the changes are permanently stored and survive system failures or crashes.

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

What is vertical scaling in the context of databases?

A

Increasing the resources (CPU, RAM, storage) of a single database server to enhance its capacity and performance.

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

What is horizontal scaling in the context of databases?

A

Adding more separate database servers and distributing the workload across them to handle increased load and data volume.

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

What is a primary advantage of vertical scaling?

A

Simpler to implement and manage, as it involves upgrading a single machine.

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

What is a primary disadvantage of vertical scaling?

A

Limited by hardware ceilings and creates a single point of failure.

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

What is a primary advantage of horizontal scaling?

A

Offers near-unlimited scalability and improves fault tolerance (no single point of failure).

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

What is a primary disadvantage of horizontal scaling?

A

Increased complexity in design, implementation, and management, especially regarding data consistency.

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

Define sharding in the context of databases.

A

Dividing a large dataset into smaller, independent pieces called “shards,” and storing each shard on a separate database server to distribute workload.

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

What is the purpose of a “shard key”?

A

A specific field or combination of fields in data that determines how the data will be split and distributed among different shards.

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

What are two key benefits of implementing sharding?

A

Improved scalability and enhanced performance by distributing data and queries across multiple servers.

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

What is a significant challenge when implementing sharding?

A

Increased system complexity, difficulty in choosing an effective shard key, and challenges with cross-shard queries or rebalancing.

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