Hello everyone,
I want to give a badge to my user when they do a particular action on the app, like connect to their twitter or something.
But I don’t know the most efficient way to build it in the database.
Should I create a new set of options named “Badge” and an option for each type of badge I want to offer. I then add a “Badge” field to my “User” data table, which can contain several badges.
Or do I need to create a new data table with a User field and a Badge field?
Hi there, @aurelien.mary… maybe my reply on another recent thread could be helpful to you.
Best…
Mike
Hi @mikeloc, thanks for helping me.
But in terms of optimization and loading time, what will be the more efficient ?
For something like a simple badge system, I would focus more on the functionality you need rather than efficiency. For example, if you need to know when each badge was given, then only having a list on the User
data type is a non-starter. However, if you just want to associate badges with users and a user can only have one of each badge, then the list would be fine. So, that’s my advice… focus on the feature from a user perspective, and build what you need. In terms of optimization, loading time, and efficiency, I’m guessing it would all pretty much come out in the wash anyway with such a simple feature.