Database Types Flashcards

1
Q

What are the 3 open source relational databases mentioned in the book?

A

MySQL,
MariaDB
PostgreSQL

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

Acording to the book, what are the three distinct differences about a non-relational database compared to a relational one?

A

1) They don’t have a predefined structure based on tabular data
2) Data validation happens in code, as opposed to being done in the DB
3) Data types are absent

while they aren’t tabular, they still can store structured data! Data-types aren’t entirely excluded, they’re just not rigidly enforced and can be defined by the user.

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

Which of the below non-relational database type stores data in the most simplest of the non-relational types and is suited for applications that need fast and scalable access?

Key-Value
Document
Column-Family
Graph

A

Key-Value.

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

Match the key value type to the database. Note, the same structure choice can apply to more than one database

1) can be structured, semi-structured and unstructured
2) structured only
3) structured or semi-structured

key-value
document
column-family
graph*

A

1) can be structured, semi-structured and unstructured - document
2) can be structured, semi-structured and unstructured - column-family
3) can be structured, semi-structured and unstructured - key-value
4) can be structured, semi-structured and unstructured - graph

Yes! They’re all the same!

*graph databases don’t use key value pairs but the properties is akin to columns in a relational database and these can contain the structures above.

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

What is meant by globally unique keys in reference to key-value databases?

A

The keys are not just unique to the table but unique across different databases or servers.

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

Is similar to a key-value database but instead the value must conform to a strict format, rather than have no structural limits

A

Document database

format structure not to be confused with the structure of the data!

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

can search using both the key and within the value itself

A

Document database

because the value has a known structure

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

1) It uses xxx-xxxxx pairs to store data
2) xxxxxxx that share similar types of data are grouped into what’s called a xxxxxx xxxxx
3) xxxx are linked to one or more xxxxxx xxxxxxx
4) Each xxxxxx within a xxxxxx xxxxx is stored separately in their own partition

A

1) It uses KEY-VALUE pairs to store data
2) COLUMNS that share similar types of data are grouped into what’s called a COLUMN FAMILY
3) KEYS are linked to one or more COLUMN FAMILIES
4) Each COLUMN within a COLUMN FAMILY is stored separately in their own partition

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

Which of the four database types below would you choose if you need to store massive data sets with lots of attributes and relationships that needs to scale?

Key-value
Column-family
Graph
Document

A

Column-family

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

You need to store and retrieve simple data quickly that doesn’t have a lot of structure, which of the two non-relational databases would you choose?
Key-value or Column-family

A

Key-value

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

a key value pair is a way of storing and retrieving ____?

A

Key-value pair is a way of storing and retrieving data

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

What kind of database best supports complex data like social networks, fraud detection and recommendation systems?

A

Graph databases

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

a column-family database stores data in columns, TRUE or FALSE

A

No, in rows.

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

which non-relational databases tend to use programming languages to query the data as opposed to using a query language?

A

key-value and document databases

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

Which database type would you pick if you needed to handle many simultaneous requests at speed and is easily scalable?

A

key-value

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

key-value databases tend to be associated with ____ systems, whereas column family databases tend to be associated with ____ systems

A

1) key-value databases tend to be associated with OLTP systems
2) column family databases tend to be associated with OLAP systems

17
Q

which kind of database stores data in field-value pairs?

A

Document database

18
Q

If you are working with data that may change frequently over time through development, which database type would be best?

key-value database
column-family database
document database

A

Document database

19
Q

can query within a _____ in a document database, whereas only the _______ can be queried in a key-value database

A

can search within a VALUE in a document database, whereas only the KEY can be queried in a key-value database

this is due to the value part requiring specific strucutre

20
Q

Which database type stores data in self-contained objects in a specific structured format?

A

Document databases

21
Q

Flexibility and agility is your priority, which database would you pick?

key-value
column-family
document

A

document database

22
Q

which database type uses traversal algorithms to query data?

document
column-family
key-value
graph

A

Graph databases

23
Q

Link the statements with the database types

1) efficient at handling structured data
2) optimized for read-heavy OLAP systems
3) Optimized for write-heavy, semi structured and unstructured
4) suited for OLTP systems storing frequently accessed data that needs to be retrieved quickly
5) Optimized for time-series data

Relational database
column-family database
document database
key-value

A

1) efficient at handling structured data / Relational database

2) optimized for read-heavy OLAP systems / column-family database

3) Optimized for write-heavy, semi structured and unstructured / document database

4) suited for OLTP systems storing frequently accessed data that needs to be retrieved quickly / key-value
5) Optimized for time-series data / column-family database

24
Q

Which non-relational database types are more often used in OLAP systems?

A

Column-family and Graph databases

they of course can be used for OLTP but much less so than relational databases.

25
Q

Which database types are more often used in OLTP database?
Which can be an exception?

A

Key-Value
Document
Tabular

Document can be an exception.

26
Q

….are a way of ensuring data integrity and relationships between tables

A

Primary keys and foreign keys