Graph Databases, Column Stores, Key Value Stores and Document Databases Flashcards

1
Q

Relational Database

A

Primary keys prevent duplication, foreign keys enforce referential integrity and normal form rules prevent anomalies.

Data is always consistent. However performance issues may occur if it is too big and there may be wasted space.

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

Graph Databases

A

Viewing data as a mathematical graph; relationships between data are key but they do not always need to have the same values. Often used in social networking

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

Advantages of Graph Databases

A
  • Flexible structure
  • Clear representation of relationships
  • Speed depends on relationships rather than amount of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Disadvantages of Graph Databases

A
  • Difficult to scale as it is a one-tier architecture

- No uniform query language

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

Column Stores

A

Column stores have tables like relational databases however the data is stored in column rather than rows e.g.
Column 1: (‘Jason’, ‘Steve’)
Column 2: (‘Steggles’, ‘Riddle’)

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

Advantages/Disadvantages of Column Stores

A

Performance of searching for a specific column is much faster BUT for a specific row is much slower

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

Hashing

A

Key-Value stores are based on hashing. Applying a hash function to a key to determine where each piece of data is stored in memory

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

Keys

A

Keys are the raw data which has a hashing function applied to

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

Values

A

Values can be anything - different databases permit different data types. stored in the key

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

Advantages of Key-Value stores

A
  • Querying is very simple
  • Can have a large number of records
  • Consistency does not need to be ensured
  • Data variation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Disadvantages of Key-Value stores

A
  • Lack of referential integrity: can have data in different types
  • Basic querying only, can’t do many complex queries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Document Databases

A

Self contained - each document might have different numbers of fields and different fields to other documents.

Similar to key-value stores where there are keys, usually a text string. Document can be queried to return certain parts of it.

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

Representation of Document Databases

A

Documents might be in a variety of formats, e.g JSON, XML, PDF
Documents are similar to objects in object oriented programming
Basic operations are permitted (CRUD)

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

Advantages of document databases

A
  • Can be good with a variety of data as documents can contain different fields
  • Key valued storage approaches offers quick performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Disadvantages of document databases

A
  • Basic operations only
  • No normalisation at all; same information can be duplicated in different documents
  • Inconsistencies can arise between different documents if the data is entered in incorrectly or updated but not changed in all documents
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

MongoDB

A

Stores documents in a similar format to JSON with key-value pairs
Uses the concept of Collection which is a collection of documents

17
Q

Collections

A

Collections store records, which are referred to as documents. Collections are the equivalent of tables in RDBMS, and documents can be thought of as rows in a table. The difference is that you don’t define what columns (or rather attributes) there will be in advance.