Write to an Exsisting Row

Are you trying to implement what I had suggested here…?

That’s essentially a “3 table” solution: Users, Promotions & Redemptions
So yes, there needs to be a relation between Users & Redemptions, as that’s how you track which users have redeemed which promotions.

The link I gave you earlier today is an alternative “2 table” solution, which doesn’t require a separate Redemptions table. The differences:

  • 3 Table Solution:
    • Easier to understand and implement
    • But, costly in terms of row count. The Redemptions table requires one row per user, per Promotion redeemed. So for example, imagine you have 100 promotions and 100 users, and every user redeems each of the 100 promotions. That’s 10,000 rows.
  • 2 Table Solution:
    • More complicated and slightly more difficult to implement.
    • But, much more efficient in terms of row count. Only one row per Promotion is required, regardless of the number of users. So 100 promotions and 100 users (or 100,000 users) will only use 100 rows.

You probably won’t like me saying this, but the easiest way to solve that would be to apply row owners, so that each user only has access to their own redemptions :slightly_smiling_face:

1 Like