Week 3: Big Data Modelling Flashcards

1
Q

3 Components of a data model

A
  • Structures
  • Operations
  • Constraint
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a data model characterized ?

A
  • Structure of the data that it admits
  • Operations on that strcutre
  • A way to specift constraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Example of structued data

A
  1. First name
  2. Last name
  3. DoB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Example of semi-structured data

A
  1. First Name
  2. Last Name
  3. DOB
  4. Occupation
  5. Salary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Example of unstructured data

A

02023#02023#02023#02023#02023#02023#02023

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

NoSQL stands for

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

4 types of NoSQL database models

A
  1. Key / Value
  2. Document
  3. Wide column stores
  4. Graph
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

4 Advanatages of Key / Value database

A
  1. Simplest and most flexible
  2. Stores a value indexed by a key
  3. No Schema
  4. Value is a binary large object which doesnt care about data type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

3 Key Value suitable use cases

A
  1. Session information
  2. User profiles and preferences
  3. Shopping cart data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

3 Key Value unsuitable use cases

A
  1. Data with relationships
  2. Operations on sets of data
  3. Transactions with multiple operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

3 Document-oriented database suitable use cases

A
  • Event logs
  • CMS / Blogging
  • Analystics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

3 Docuement-oriented database unsuitable use cases

A
  • Complex cross-document transactions
  • Queries that rely on fixed schema
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Wide column stores 3 use cases

A
  • Event logs
  • CMS / Blogging
  • Analytics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

2 Wide column stores unsuitable use cases

A
  • Complex cross-document transactions
  • Queries that rely on fixed schema
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Graph database consists of what 2 elements

A
  • Node - an entity
  • Edge - a relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

3 Graph database suitable use cases

A
  • Social networks
  • Recommender systems
  • Routing and location-base services
17
Q

Dont use graph databases for what use case

A

Operations on sets of data

18
Q

JSON is built on what 2 structures

A
  • Collection of name/value pairs
  • An ordered list of values
19
Q

What is a JSON object

A

an unordered set of name/value pairs

20
Q

What is an JSON array

A

an ordered collection of values

21
Q

Describe MongoDB Model

A
  • Database
  • Collections
  • Documents
22
Q

Describe Relation DB Model

A
  • Database
  • Tables
  • Rows
23
Q

Describe RDB vs MongoDB in terms of schema

A

Relation DB has a well deifne schema for the data it stores

MongoDb is schemaless

24
Q

Describe RDB vs MongoDB in terms of data rejection

A
  • Relation DB will reject data that doesnt conform to schema
  • Mongo DB can stored unstructured data where content is not known
25
Q

MongoDB 3 insert steps

A
  1. db
  2. use myDatabase
  3. db.myCollection.insert( { “country” : “scotland” } )
26
Q

MongoDB remove operation

A

db.myCollection.remove( { “city” : “London” } )

27
Q

MongoDB update operation

A

db.myCollection.updateOne( {“country” : “USA”} , { $set : { “city” : “ New York” } } )

28
Q

An aggregation pipeline uses what 2 operations

A
  1. $match
  2. $group
29
Q

What is Map

A

Map is same computation across all items

30
Q

What is reduce

A

Combing the mapped values

31
Q

Design a MongoDB data model for a specified scenario and contrast it with the way the data would be modelled in a relational database (also in week 11)

A
32
Q

Retrieve MongoDB data from Python

A
33
Q
A