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

Refactor: Store all donations for all funds in a single table #231

Closed
yuriytkach opened this issue Dec 7, 2023 · 1 comment
Closed

Refactor: Store all donations for all funds in a single table #231

yuriytkach opened this issue Dec 7, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yuriytkach
Copy link
Owner

The single table design is likely more appropriate. Here's why:

  • Moderate Data Volume: The number of records per fund is not so large that it would necessitate separate tables for performance reasons.
  • Temporary Funds: The temporary nature of funds means that the number of active tables would continually grow, increasing management overhead.
  • Access Patterns: Most queries are for the current fund, which can be efficiently handled with a GSI (Global Secondary Index).
  • Simplicity: A single table is simpler to manage, and you can use GSIs to efficiently query for donations related to a specific fund.

Arguments for Separate Tables (good arguments, but something that we don't need):

  • Isolation: Each fund is completely isolated from the others. This can simplify some aspects of data management, such as access control, backup, and deletion.
  • Schema Flexibility: If different funds might have slightly different data requirements, separate tables can accommodate these differences more easily.

Since we already have separate tables, we would need to write a script that first populates that newly created table with data from existing donations tables. We have switch in lambda to single donation's table, deploy it and then run the script. For a short time list of donators won't be visible, which is fine.

@yuriytkach yuriytkach added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 7, 2023
@yuriytkach
Copy link
Owner Author

Fixed in #240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant