跳转到主要内容
Chinese, Simplified

要验证数据模型,请使用前面定义的访问模式。

 

Question

Base table/GSI

Query

1

作为用户,我希望检索父组件ID的所有直接子组件。

GSI1

ParentId = "<ComponentId>"

(Find immediate children of a component.)

2

作为用户,我希望检索组件ID的所有子组件的递归列表。

GSI1 or GSI2

GSI1: ParentId = "<ComponentId>"

or

GSI2: GraphId = "<TopLevelComponentId>#N" AND BEGINS_WITH("Path", "<PATH_OF_Component>")

(Find all down-level child components using a top- level component. Find all down-level child components using a middle-level component.)

3

作为用户,我希望看到组件的祖先。

Base table

ComponentId = "<ComponentId>", then select the Path attribute.

(Find ancestors of a component.)

 

原文地址
https://docs.aws.amazon.com/prescriptive-guidance/latest/dynamodb-hierarchical-data-model/faq.html
本文地址
Article

微信

知识星球

微信公众号

视频号