NoSQL Flashcards

1
Q

What does NoSQL stand for and when was the term first used?

A

NoSQL stands for “Not Only SQL” and was first used in 1998 by Carlo Strozzi for an open-source RDBMS that used a non-SQL query language. The term was popularized in 2009 during a meetup in San Francisco discussing new database solutions.

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

What are the strengths of traditional RDBMSs?

A

Strengths include ACID properties for data consistency

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

What are common weaknesses of RDBMSs?

A

Weaknesses include impedance mismatch with object-oriented programming

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

What are common features of NoSQL databases?

A

Features include support for multiple data models

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

What are the main data models used in NoSQL databases?

A

Key-value

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

What is the key-value data model?

A

A simple model where a unique key is associated with a value (e.g.

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

What is a document data model?

A

A model where data is stored as documents in a structured format like JSON or BSON

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

What is the wide-column data model?

A

Data is stored in tables with rows and columns

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

What is the graph data model?

A

A model that focuses on the relationships between entities using vertices and edges. Ideal for social networks

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

What is sharding in NoSQL databases?

A

Sharding is the process of splitting data into smaller parts called shards

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

What are the main sharding strategies?

A

Hash strategy (even data distribution but inefficient for range queries)

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

What is replication in NoSQL databases?

A

Replication involves creating copies of data on multiple nodes to improve fault tolerance and availability

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

What are the pros and cons of master-slave replication?

A

Pros: Easy handling of read-heavy workloads

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

What is peer-to-peer replication and its drawbacks?

A

All nodes can handle reads and writes

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

What is the CAP theorem in NoSQL?

A

It states that a distributed database can only guarantee two of the three properties: Consistency

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

What does the PACELC theorem state?

A

In the presence of a partition (P)

17
Q

What is the BASE model in NoSQL?

A

Basically Available

18
Q

When should a key-value store be avoided?

A

When data relationships are complex or when operations need to span multiple records.

19
Q

What is polyglot persistence?

A

The practice of using different data storage technologies within the same application to leverage the strengths of each system.

20
Q

What are some popular NoSQL databases for each data model?

A

Key-value: Redis

21
Q

What is an aggregate in the context of NoSQL?

A

An aggregate is a collection of related data treated as a single unit

22
Q

What is the importance of choosing a good sharding strategy?

A

It ensures data locality

23
Q

What are common use cases for document-oriented databases?

A

CMS

24
Q

When should a graph database be used?

A

For scenarios requiring complex relationship modeling