In Dynamodb, database is a collection of table, and table is a collection of item, and item is a collection of attribute. attribute is name-value right. Value can be a single-valued property or a multivalued property (collection). The size of an item cannot exceed 64KB. You get started by understanding this.
In addition, DYNAMODB proposes the idea of a two-level index to support richer queries , you can create one or more level two indexes in a table and issue Query requests to those indexes. There are two types of two-level indexes:
Local level two index (locally secondary Indexes) – the same hash key as the table, but a different index for the range keys. A local two-level index is referred to as "local" because the scope of each of its partitions is limited to the same table partition as the hash key.
Global level Two index (globally secondary Indexes) – hash key or hash-range keys can be indexed differently from these keys in the table. A global two-level index is called global because a query on that index can span all partitions, covering all the items in the table.
Because items with the same primary key hash value share the same partition in DynamoDB, the local level two index contains only items that are stored in the same location (the same partition). Therefore, LSI can be used to query items that have the same primary key hash value, but with different range keys.
It is important to note that all the GSI related to the table must be specified when the table is created. A GSI index does not require that indexed properties be unique. The GSI supports eventual consistency. When you insert or update items in a table, the GSI does not synchronize updates.
There are some limitations to note that the size of all item collections in Amazon DynamoDB must not exceed ten GB. For any distinct hash key value, the sum of the item sizes in the table plus the local level two index in the table must not exceed ten GB for all item sizes.
Original: http://blog.csdn.net/hongchangfirst/article/details/27212633
Author: Hongchangfirst
Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst