Step 7: Validate the data model - AWS Prescriptive Guidance

Step 7: Validate the data model

In this step, the business user validates the query results and checks whether they satisfy business needs. You can use the following table to check the access patterns against the requirements of the user.

Question

Base table / GSI

Query

As a user, I want to retrieve all the immediate child components for a parent component ID.

GSI1

ParentId = "<ComponentId>"

(Find immediate children of a component.)

As a user, I want to retrieve a recursive list of all child components for a component 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.)

As a user, I want to see the ancestors of a component.

Base table

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

(Find ancestors of a component.)

You can also implement a script (test) in any programming language to query DynamoDB directly and compare the results with the expected results.