Databases Flashcards

1
Q

Relational Database Types

A
SQL
Oracle

MySQL

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

Non-relational databases on AWS

A

DynamoDB

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

DynamoDB Database Parts

A

Collection = table
Document = Row
KV pairs = Field/data

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

OLTP SF

A

Online Transaction Processing

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

OLAP SF

A

Online Analytics Processing

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

OLTP is

A

Pulling up data, a basic request

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

OLAP

A

Analysis of a large volume of information on a database, it can use a lot of resources. Usually you̥ll use a copy

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

Elasticache is

A

A deployed in-memory cache in the cloud. It caches the most consistently queries fields to make the database faster.

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

DMS SF

A

Database Migration Services

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

DMS

A

Allows migrations to databases and does transformation, compression and parallel transfers and converts to formats of target database

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

RDS OLTP Types

A

SQL
MySQL
PostgreSQL
Oracle
Aurora
MariaDB

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

OLAP Types

A

Redshift

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

NoSQL DB types

A

DynamoDB

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

Elasticache Types

A

Memcached
Redis

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

DynamoDB is

A

Fast flexible NoSQL database for document and key-value data models

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

Why use DynamoDB?

A

SSD Storage
Spread across 3 geographically distinct data centres

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

Dynamo Eventual Consistent Reads

A

Default setting. Consistently copies all data within a second to other data centers. Give best read performance

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

Basic inclusions of DynamoDB

A

Tables
Items (rows)
Attributes (columns)

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

Levels of nesting supported in Dynamo

A

35

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

Dynamo pricing for Write Throughput

A

$0.0065 per hour for every 10 units

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

Dynamo pricing for read throughput

A

$0.00065 per hour for every 50 units

22
Q

Dynamo storage cost

A

first 25 GB stored per month is free
$.25 per GB per month there after

23
Q

Dynamo Strongly Consistent Reads

A

Reflects all writes that receives a successful response prior to the read

24
Q

DynamoDB the 2 types of primary keys

A

Single attribute
Composite

25
Q

DynamoDb Unique ID

A

(think unique ID)
aka partition key

26
Q

DynamoDB Composite Key

A

Think unique ID and a date range
Partition Key & Sort key composed of 2 attributes

27
Q

DDB Partition Key

A

Dynamo uses the partition keys value as input to an internal hash function.
Must be unique!

28
Q

DDB Two items with the same partition key

A

Must have a different sort key
All items of the same partition key are stored together sorted by sort key value

29
Q

DDB Local Secondary Index

A

SAME partition key, different sort key
Can only be created with creating a table

30
Q

DDB Global Secondary Index

A

Has different partition and sort key
Can be added at any time

31
Q

DDB Streams

A

Captures modifications
- Any new items
- Tracks changed items
- Holds deleted items
Stores for 24 hours
Useful for sending an on boarding email

32
Q

DDB Query

A

Query using only primary key value. Can also use sort key (usually a date)

33
Q

Types of indexes

A

Local secondary
Global secondary

34
Q

Scan vs Query

A

Query only finds by primary key value (can use sort)
Scan looks at all the data and filters out (slower!)

35
Q

ProjectionExpression

A

Parameter for scanning so that the query only return some of the attributes, not all

36
Q

To get query results reverse sorted

A

Set ScanIndexForward to false

37
Q

To limit what scan shows

A

Use a projection expression

38
Q

Units of read provisioned throughput

A

Reads are rounded up to 4kb increments
Consistent reads consist of 2 reads per second
Strongly consistent reads are 1 read per second

39
Q

Unit of write provisioned throughput

A

All writes are 1 Kb
All write consist of 1 Kb per second

40
Q

read throughput calculation

A

(Size of read rounded to nearest 4kb chunk/4) * no of items

41
Q

eventually consistent read throughput calculation

A

(Size of read rounded to nearest 4kb chunk/4) * no of items
Then divide by 2

42
Q

You have an application that requires to read 10 items of 1 kb per second using eventual consistency. What should you set the read throughput to?

A

(1kb4/4) = 1 read unit per item
1
10 = 10
10/2 = 5 units of read throughput

43
Q

What happens if consistency exceeded?

A

get a 400 code

44
Q

Web identity provider basics

A

Use Facebook/google or any open-id connect compatible to Id provider. Done with AssumeRoleWithWebIdentity API
Need to create role first

45
Q

Parts of a Web Identity Provider link

A

Web identity token
App ID of provider
ARN of role

46
Q

Temporary security credentials include

A

Access token/key
Expiration time limit
AssumeRoleId
SubjectFromWebIdentityToken

47
Q

Steps taken to authenticate

A

User authenticate with ID provider
Passed a token by ID provider
Your code calls AssumeRoleWithWebIdentity API to provide token for the ARN of the role

48
Q

You have a motion sensor which writes 600 items of data every minute. Each item consists of 5kb. What should you set the write throughput to?

A

50
Correct. 600 / 60 = 10 items per second. You are using 5kb per write and writes are measured in 1kb per write. This means that you need 5 writes per item, 5 x 10 = 50 writes per second.

49
Q

What is the API call to retrieve multiple items from a DynamoDB table?

A

BatchGetItem

50
Q

You have a motion sensor which writes 600 items of data every minute. Each item consists of 5kb. Your application uses strongly consistent reads. What should you set the read throughput to?

A

20
Correct! 600 / 60 = 10 items per second. 5kb rounded to nearest 4kb chunk is 8kb. 8 / 4 = 2. This means you need 2 reads per item. 2 x 10 = 20 reads per second. As the reads are Strongly consistent, you do not need to divide by 2. So the answer is 20.

51
Q

You have an application that needs to read 25 items of 13kb in size per second. Your application uses eventually consistent reads. What should you set the read throughput to?

A

50
Correct. Your application reads 13kb per item. Round up to the nearest 4kb chunk = 16kb. 16kb / 4kb = 4 reads per item. You have 25 items so 25 x 4 = 100. Your application requires eventually consistent reads which means you divide by 2. 100/2 = 50.

52
Q

What amazon service can you use in conjunction with SQS to fan out” SQS messages to multiple queues.”

A

SNS