AWS docs notes

标签:system   tps   ems   guide   blank   example   gui   test   sed   

DynamoDB supports two types of primary keys:

  • Partition key: A simple primary key, composed of one attribute known as the partition key. Attributes in DynamoDB are similar in many ways to fields or columns in other database systems.
  • Partition key and sort key: Referred to as a composite primary key, this type of key is composed of two attributes. The first attribute is the partition key, and the second attribute is the sort key. Following is an example.

Reference: https://aws.amazon.com/cn/blogs/database/choosing-the-right-dynamodb-partition-key/

 

对partition key做hash function, 决定这条entry存储在哪个partition机器上。

如果有sort key,再根据sort key升排序。这种情况Query时可以不提供sort key,所有partition key下的items将以升序返回。也可以根据sort key进行一定范围的查找。

Reference: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.Partitions.html

AWS docs notes

标签:system   tps   ems   guide   blank   example   gui   test   sed   

原文地址:https://www.cnblogs.com/wangby511/p/14296507.html

版权声明:完美者 发表于 2021-01-19 12:30:09。
转载请注明:AWS docs notes | 完美导航

暂无评论

暂无评论...