SQL vs. NoSQL Flashcards

(13 cards)

1
Q

What are SQL databases?

A

They are relational databases that use a structured query language (SQL) to work with the data.

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

How do SQL databases work?

A

Data is structured in tables consisting of rows and columns. Tables can have relationships with other tables. They also have well defined schemas.

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

What are some key features of SQL databases?

A

ACID compliance to ensure reliable transactions, structured data (via schema along with rows/columns/tables), and a robust query language.

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

What are some examples of SQL databases?

A

Microsoft SQL Server, Postgres, MySQL, Oracle.

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

What is a popular use-case for a SQL database?

A

Any systems requiring very strong consistency guarantees like banking/financial and systems where the schema/structure of the data seldom changes.

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

What are NoSQL databases?

A

NoSQL databases are non-relational or distributed databases. They can handle non-relational or unstructured data using a variety of different data models.

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

What are some examples of NoSQL data models?

A

Key-value, document, columnar (wide-column), graph, etc.

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

How do NoSQL databases work?

A

They do not require a fixed schema and support schema changes at any time. Many are designed to scale out across clusters (perfect for large or cloud workloads).

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

What are some features of NoSQL databases?

A

Speed (no hard consistency guarantees or latency), flexibility (no fixed schema), scalability (designed to scale out)

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

What are some examples of flavors of NoSQL databases?

A

Key-value - Redis, Memcached
Document - Mongo
Columnar - Cassandra
Graph - Neo4J

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

What are NoSQL databases best for?

A

Systems that require flexibility and/or scale.

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

How do SQL and NoSQL differ in regards to: data structures, scaling, transactions, and complexity?

A

Data Structures
SQL is very structured with a required rigid schema, NoSQL is flexible.

Scaling
SQL scales vertically while NoSQL scales horizontally.

Transactions
SQL has robust transaction support while NoSQL support is limited.

Complexity
SQL excels with complexity queries while NoSQL generally focuses on simplicity and speed.

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

When should you choose SQL over NoSQL and vice versa?

A

Choose SQL when… you have a well defined or unchanging schema and require strong consistency guarantees like ACID.

Chose NoSQL when… you need flexibility or require extreme scale.

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