Dynamo DB M:N relationship issue

12 Views Asked by At

I'm working on a data modeling challenge in DynamoDB involving two entities: Class and Student. I have several million records for Student and a few hundred for Class. A Student can belong to multiple Classes, and a Class can have multiple Students.

Access Pattern Challenge: I need to efficiently list all Students who are not enrolled in a specified Class. The primary challenges I'm facing are:

  1. DynamoDB does not support querying based on negative conditions directly.
  2. Avoiding full table scans.
  3. Minimizing application-level filtering. Given these constraints, how can I model my data in DynamoDB to support this access pattern through a single query operation?

Additional Context:

The solution should ideally allow retrieval of full profile details for each Student. The dataset includes several million Student records, which necessitates a highly efficient querying approach.

0

There are 0 best solutions below