(Curiosity) How do you implement 'tag' search systems? (SQL, non-SQL, etc...)

I'm building a flashcard based app which I want to contain custom content based on the needs and desires of the user. I'd like one of the properties of these flashcards to be tags, which could be used for organization and sharing between users. However, even though I didn't start thinking about scalability and such for my app, I became curious on how to implement this in a 'correct' manner.

I've seen already several posts on stackoverflow/quora about this and saw some possible solutions (hence the title). Since tag based widgets are easily available for usage in Outsystems, I'd like to know from more experienced people how do you utilize them.

The first thing that came into my mind was using a 3-way table (flashcard / tag / flashcard-tag) to link them. I believe that this would work, just as it worked for other things that have the same described relationship. I'd probably set a static entity with 'system tags', which I could extend over time. Since I'd like to implement custom tags for users, I thought about creating extra systems tags (up to 10) which would be placeholder like tags, which users could change their names to whatever name they want, while keeping them under a same implementation for the entire app.

As I'm not a programmer by craft, I'd like to know other people's experience with this system and how they implemented it.

Hello Bruno,

We recently introduced a tag system in one of our apps.

We used the "3-way table" and it's all working as it should.


You could automatically create the "system tags" for every user (These tags they couldn't update - for this you could add a new Boolean atribute to them like "AllowUpdate" and set it to False by default).

And allow them to create X number of new tags (you can limit the creation in many ways, such as counting the existing tags, as an example).

We even used a Forge component to show a tagcloud:
https://www.outsystems.com/forge/component-overview/1927/tagcloud