码迷,mamicode.com
首页 > 其他好文 > 详细

AWS docs notes

时间:2021-01-19 12:30:09      阅读:0      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!