07 - Managed NoSQL: DynamoDB Flashcards

1
Q

Define

Cloud Computing

A

on-demand delivery of IT resources and applications via the Internet, with pay-as-you-go pricing.

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

How does cloud computing reduce IT costs?

A
  1. Multiple pricing options also help you optimize costs based on your unique workloads.
    2.lower cycles In comparison, an on-premises solution typically requires upgrades on 1/3/5-year cycles. The cost of labor and systems administration can be significant. ​
  2. The cost savings achieved using the cloud empowers organizations to shift resources toward innovative, new projects
  3. Cloud computing can move with your business. Its speed and agility makes it possible for you to respond to changing market conditions and computing requirements. ​
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In a traditional infrastructure, ____ is a challenge due to the amount of time it can take to get a server procured, delivered, and running.

A

scalability

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

When Running your database in the Cloud (IaaS), which ones are handled by you?

7

A
  1. App optimization
  2. Scaling
  3. high availability
  4. Backups (DB)
  5. Patches (DB software)
  6. Installations (DB software)
  7. operating system patches

ASHBPIO

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

When Running your database in the Cloud (PaaS), which ones are handled by you?

A

App optimization

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

DynamoDB characteristics

4

A
  1. Fully managed
  2. Virtually unlimited
  3. Low latency (< 10ms)
  4. Flexible schema
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define

flexible schema

A
  • DynamoDB supports both key-value and document data models
  • each row can have any number of columns at any point in time
  • u can easily adapt the tables as your business requirements change
  • w/o having to redefine the table schema as you would in relational databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When to use SQL

A
  • Complex transactions/queries
  • A medium to high query or write rate – Up to 30,000 IOPS (15,000 reads + 15,000 writes)
  • High durability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When to use DynamoDB

A
  • Massive read/write rates (for example, 150,000 write/second)
  • Sharding due to high data size or throughput demands
  • Simple GET or PUT requests and queries

Can only put & read data as is

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

T/F

You won’t be doing complex queries in DynamoDB and you won’t use simple GET and PUT request and queries.
You will probably would leave your analytics

A

F
You won’t be doing complex queries in DynamoDB but rather simple GET and PUT request and queries.
You will probably would leave your analytics

Aka: Can only put & read data as is

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

Is DynamoDB vertically or horizontally scaled?

A

horizontally

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

Define

Partition key

A

Attribute of data that divides data across multiple machines
Ex. Course

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

Differentiate

Single Key vs Compound Key

A

Single key: partition key is the only key
* Partition key + attributes

Compound key
* Sort key in addition to partition key
* Partition key + sort key + attributes

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

Define

Sort Key/Range Key

A

Sorts data w/in a partition

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

Note that if you decide to only specify a partition key and not a sort key (also known as a Range Key), all records must have a _____________

A

unique partition key value

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

As data grows, how is table partitioned?

A

Partitioned by key

17
Q

When do you use QUERY vs SCAN?

A

QUERY by key to find items efficiently
SCAN to find items by attribute

18
Q

Is SCAN cost-effective for DynamoDB?

A

No
Need to practice proper data modeling, para ma-identify primary keys & data will be more cost effective

19
Q

DynamoDB Data Modeling Process

A
  1. Start with an ERD
  2. Define access patterns
  3. Design your table schema
  4. FORGET YOUR RELATIONAL CONCEPTS
20
Q

Elaborate

FORGET YOUR RELATIONAL CONCEPTS

A

NO normalization
NO joins
NO one entity per table rule

21
Q

Differentiate

Global Secondary Index vs Local Secondary Index

A

GSI: alternate partition and/or sort key (online indexing)
* Index across all partition keys
* Has RCUs/WCUs (Read Capacity Unit / Write Capacity Unit)
* can assign a new partition key and new sort key
* gives a new primary key
* functions as a new table (redundancy of old, w/ new partition key & sort key)

LSI: alternate sort key attribute
* Index is local to a partition key, enclosed
* Doesn’t change partition key, only assigns a new sort key
* 10 GB max per partition key

22
Q
A
23
Q

Define

Projection
What is part of a projection

A

Projection: new table
* new partition and sort key
* old partition key
* extra attributes, or all attributes

24
Q

How to choose a good partition key?

A
  • Match common access patterns
  • High cardinality
  • Evenly distributed values
  • Is well-known to the application