Recall & Review
beginner
What is the adjacency list pattern in databases?
It is a way to represent hierarchical data by storing each item's parent ID in the same table, creating a list where each item points to its parent.
Click to reveal answer
beginner
How does the adjacency list pattern store relationships between items?
Each item has a field that stores the ID of its parent item, linking children to their parents directly.
Click to reveal answer
intermediate
Why is the adjacency list pattern useful in DynamoDB?
Because DynamoDB tables can store items with a parent ID attribute, it allows easy querying of child items by filtering on the parent ID.
Click to reveal answer
intermediate
What is a common challenge when using the adjacency list pattern?
Retrieving all descendants of a node can be complex because it requires multiple queries or recursive logic outside the database.
Click to reveal answer
beginner
How can you query child items of a parent in DynamoDB using the adjacency list pattern?
By querying the table with a condition on the parent ID attribute equal to the parent's ID, you get all direct children.
Click to reveal answer
In the adjacency list pattern, what does each item store to represent hierarchy?
✗ Incorrect
Each item stores the ID of its parent to link itself in the hierarchy.
Which DynamoDB attribute is commonly used to store the parent reference in adjacency list pattern?
✗ Incorrect
The parentId attribute holds the ID of the parent item.
What is a limitation of the adjacency list pattern in DynamoDB?
✗ Incorrect
Getting all descendants requires multiple queries or extra logic.
How do you find all direct children of a node in adjacency list pattern?
✗ Incorrect
Direct children have their parentId set to the parent's ID.
Which of these is NOT true about adjacency list pattern?
✗ Incorrect
Getting all descendants usually requires multiple queries.
Explain how the adjacency list pattern models hierarchical data in DynamoDB.
Think about how each item knows who its parent is.
You got /4 concepts.
Describe a challenge when retrieving all descendants using the adjacency list pattern and how it affects querying.
Consider what happens when you want grandchildren or deeper levels.
You got /4 concepts.