SQL, NOSQL databases Flashcards

1
Q

What are 7 advantages of using SQL

A
  • Relational data model (tables of data that are organised and related based on PK and FK relationships, nomalisation is used for tables 1NF, 2NF, 3NF, 4NF)
  • Strong data integrity (constraints on the data means it is consistent, ACID)
  • Retrieve and manipulate data in different ways
  • Widely used and supported - many resources available
  • Can be scaled up to handle large data sets and designed to work well in high-performance environments
  • Long history of development, deployment and security so it is robust and secure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are 6 disadvantages of SQL

A
  • Can be expensive to implement, maintain and scale (extra hardware)
  • Performance declines as data grows
  • Rigid data structure makes it difficult to accommodate changing requirements
  • Queries can be complex and difficult to write
  • Doesn’t support unstructured data ie., graphs, images, videos
  • Security concerns ie., injection attacks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the advantages of NOSQL

A
  • Scalable and able to process large amounts of unstructured or semi-structured data
  • Flexible because it can be easily changed without having to change the underlying schema
  • Fast read and write performance
  • Typically cheaper than relational databases because don’t require complex set up and hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the cons of NOSQL?

A
  • Unstructured making it difficult design, implement and maintain consistency across data
  • Can be complex to scale
  • Doesn’t support transactions so difficult to guarantee consistency
  • No structures like joins and foreign keys can make it difficult to work with complex data structures and queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a database

A

A database is permanent storage

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

What is a cache?

A

A cache remembers the result of an expensive operation to speed up rears

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

What is batch processing?

A

Batch processing is periodically crunching a large amount of data

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

Give an example of a NOSQL database

A

MongoDB is a no sql database that supports scaling out across regions and across multiple servers

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

Describe 3 features of NOSQL databases

A

Flexible schemas
Unstructured
Fast queries due to the data model

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

What are 2 main types of NOSQL databases?

A

Document databases
Graph databases

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

What is a document database?

A

A document database stores objects similar to JSON objects.
Each document contains pairs of fields and values.

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

What are graph databases?

A

A graph database stores data in nodes and edges

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

What is a DDL?

A

Data definition language (DDL) describes the portion of SQL that creates, alters, and deletes database objects.

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

What is a DML?

A

A data manipulation language (DML) is a computer programming language used for adding (inserting), deleting, and modifying (updating) data in a database.

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

What are database design principles?

A

ACID

atomicity - if one part fails, all fails
consistency - data integrity
isolation - not changed by another transaction
durability - changes persisted permenantly

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