AMAZON DynamoDB(一)Introduction and Setup
AMAZON DynamoDB(1)Introduction and Setup
AMAZON DynamoDB(1)Introduction and Setup
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html
TTL for the Data in DB, time to live
Compare Amazon DynamoDB VS Cassandra
http://www.cnblogs.com/sing1ee/archive/2012/06/29/2765051.html
table is a collection of items, each item is a collection of attributes.
Table limitation
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#default-limits-capacity-units-provisioned-throughput
Each item in the table has a unique identifier, or primary key.
Other than primary, other is schema less, each item can have its own distinct attributes.
DynamoDB supports nested attributes up to 32 levels deep.
DynamoDB supports 2 different kinds of primary keys:
Partition key
personID
Partition key and sort key
primary key and sort key, (artist and song title), data is stored physically on top of primary key with sort key order.
If you only provide the value for Artist, DynamoDB retrieves all of the songs. You could provide a value for Artist and a range of SongTitle Values to retrieve only a subset.
Secondary Indexes
You can define up to 5 global secondary indexes and 5 local secondary indexes per table.
Global secondary index - An index with a partition key and sort key that can be different from those on the table
Local secondary index - An index that has the same partition key as the table, but a different sort key
We can create index by Genre and AlbumTitle for the Music table.
DynamoDB Streams
We can use this with Lambda to get the change events.
How to Set up DynamoDB
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.html
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ConsoleDynamoDB.html
JUnit test
https://github.com/awslabs/aws-dynamodb-examples/blob/master/src/test/java/com/amazonaws/services/dynamodbv2/local/embedded/DynamoDBEmbeddedTest.java
Running on Local
https://github.com/awslabs/aws-dynamodb-examples/blob/master/src/test/java/com/amazonaws/services/dynamodbv2/DynamoDBLocalFixture.java
The pricing for DynamoDB
https://aws.amazon.com/dynamodb/pricing/
Start the DynamoDB from Java
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Java.html
References:
http://aws.amazon.com/cn/dynamodb/developer-resources/
http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-dynamodb.html
AMAZON DynamoDB(1)Introduction and Setup
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html
TTL for the Data in DB, time to live
Compare Amazon DynamoDB VS Cassandra
http://www.cnblogs.com/sing1ee/archive/2012/06/29/2765051.html
table is a collection of items, each item is a collection of attributes.
Table limitation
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#default-limits-capacity-units-provisioned-throughput
Each item in the table has a unique identifier, or primary key.
Other than primary, other is schema less, each item can have its own distinct attributes.
DynamoDB supports nested attributes up to 32 levels deep.
DynamoDB supports 2 different kinds of primary keys:
Partition key
personID
Partition key and sort key
primary key and sort key, (artist and song title), data is stored physically on top of primary key with sort key order.
If you only provide the value for Artist, DynamoDB retrieves all of the songs. You could provide a value for Artist and a range of SongTitle Values to retrieve only a subset.
Secondary Indexes
You can define up to 5 global secondary indexes and 5 local secondary indexes per table.
Global secondary index - An index with a partition key and sort key that can be different from those on the table
Local secondary index - An index that has the same partition key as the table, but a different sort key
We can create index by Genre and AlbumTitle for the Music table.
DynamoDB Streams
We can use this with Lambda to get the change events.
How to Set up DynamoDB
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.html
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ConsoleDynamoDB.html
JUnit test
https://github.com/awslabs/aws-dynamodb-examples/blob/master/src/test/java/com/amazonaws/services/dynamodbv2/local/embedded/DynamoDBEmbeddedTest.java
Running on Local
https://github.com/awslabs/aws-dynamodb-examples/blob/master/src/test/java/com/amazonaws/services/dynamodbv2/DynamoDBLocalFixture.java
The pricing for DynamoDB
https://aws.amazon.com/dynamodb/pricing/
Start the DynamoDB from Java
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Java.html
References:
http://aws.amazon.com/cn/dynamodb/developer-resources/
http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-dynamodb.html