Introduction to Amazon DynamoDB (ii)

Source: Internet
Author: User
Tags dynamodb amazon dynamodb

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.