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
DynamoDb Unique ID
(think unique ID) aka partition key
26
DynamoDB Composite Key
Think unique ID and a date range Partition Key & Sort key composed of 2 attributes
27
DDB Partition Key
Dynamo uses the partition keys value as input to an internal hash function. Must be unique!
28
DDB Two items with the same partition key
Must have a different sort key All items of the same partition key are stored together sorted by sort key value
29
DDB Local Secondary Index
SAME partition key, different sort key Can only be created with creating a table
30
DDB Global Secondary Index
Has different partition and sort key Can be added at any time
31
DDB Streams
Captures modifications - Any new items - Tracks changed items - Holds deleted items Stores for 24 hours Useful for sending an on boarding email
32
DDB Query
Query using only primary key value. Can also use sort key (usually a date)
33
Types of indexes
Local secondary Global secondary
34
Scan vs Query
Query only finds by primary key value (can use sort) Scan looks at all the data and filters out (slower!)
35
ProjectionExpression
Parameter for scanning so that the query only return some of the attributes, not all
36
To get query results reverse sorted
Set ScanIndexForward to false
37
To limit what scan shows
Use a projection expression
38
Units of read provisioned throughput
Reads are rounded up to 4kb increments Consistent reads consist of 2 reads per second Strongly consistent reads are 1 read per second
39
Unit of write provisioned throughput
All writes are 1 Kb All write consist of 1 Kb per second
40
read throughput calculation
(Size of read rounded to nearest 4kb chunk/4) * no of items
41
eventually consistent read throughput calculation
(Size of read rounded to nearest 4kb chunk/4) * no of items Then divide by 2
42
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?
(1kb*4/4) = 1 read unit per item 1*10 = 10 10/2 = 5 units of read throughput
43
What happens if consistency exceeded?
get a 400 code
44
Web identity provider basics
Use Facebook/google or any open-id connect compatible to Id provider. Done with AssumeRoleWithWebIdentity API Need to create role first
45
Parts of a Web Identity Provider link
Web identity token App ID of provider ARN of role
46
Temporary security credentials include
Access token/key Expiration time limit AssumeRoleId SubjectFromWebIdentityToken
47
Steps taken to authenticate
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
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?
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
What is the API call to retrieve multiple items from a DynamoDB table?
BatchGetItem
50
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?
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
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?
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
What amazon service can you use in conjunction with SQS to fan out" SQS messages to multiple queues."
SNS