dynamo db

Post on 10-May-2015

1.621 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

DynamoDB

13年9月22⽇日星期⽇日

What is DynamoDB

• 讓我們來看一段官方介紹影片

13年9月22⽇日星期⽇日

What is DynamoDB

• Managed NoSQL database service

• Features

• Schemaless

• Fast - SSD

•Reserved IOPS for R/W

13年9月22⽇日星期⽇日

Data Model

• Table - collection of items

• Items - Any number of attributes, up to 64k

13年9月22⽇日星期⽇日

Data Model

• No schema - Just provide PK

• Items are indexed by PK

• Single hash key & composite key

13年9月22⽇日星期⽇日

Working with Tables

• Specifying PK

• Hash PK - ex. ProductID

• Hash and Range PK - ex. ForumName and Subject

• Specifying Read/Write requirements

13年9月22⽇日星期⽇日

R/W Requirements

• Read capacity units

• Strongly consistent read per second of items up to 4KB

13年9月22⽇日星期⽇日

R/W Requirements

• Write capacity units

• The number of 1KB writes per second

13年9月22⽇日星期⽇日

Pricing

• Based on Provisioned Throughput Capacity + Indexed Storages

13年9月22⽇日星期⽇日

Index

13年9月22⽇日星期⽇日

Query

• A Query operation directly accesses items from a table using the table primary key, , or from an index using the index key.

• Example

13年9月22⽇日星期⽇日

Scan

• The Scan operation returns one or more items and item attributes by accessing every item in the table. To have Amazon DynamoDB return fewer items, you can provide a ScanFilter.

• Example

13年9月22⽇日星期⽇日

Query & Scan cost

• For Query, all items returned are treated as a single read operation. As a result, Amazon DynamoDB computes the total size of all items and then rounds up to the next 4 KB boundary.

• In the case of a Scan operation, Amazon DynamoDB considers the size of the items that are evaluated.

13年9月22⽇日星期⽇日

DEMO

13年9月22⽇日星期⽇日

When to use DynamoDB?

• If your application can fit into DynamoDB...

• If you hate to tune the database...

13年9月22⽇日星期⽇日

top related