Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamodb_schema_update #3

Merged
merged 22 commits into from
Aug 18, 2022
Merged

Dynamodb_schema_update #3

merged 22 commits into from
Aug 18, 2022

Conversation

pritamps
Copy link
Contributor

@pritamps pritamps commented Aug 7, 2022

Updated Schema for Dynamo DB to mimic expected use case patterns for dynamo db.

Use cases

  • Get student quiz report (SQR)
  • Get all SQRs for student
  • Get all SQRs for quiz
  • Get all SQRs by batch

DynamoDB Schema

Partition key: session_id
Sort key: user_id#subject

Use cases

  • Get student quiz report (SQR): Query by partition key and sort key
  • Get all SQRs for student: begins_with(user_id)
  • Get all SQRs for quiz: Query by partition key
  • Get all SQRs for batch: Get all SQRs for quiz and then filter by batch

app/routers/reports.py Outdated Show resolved Hide resolved
@pritamps pritamps merged commit 5fa7237 into main Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants