Let’s say I have 3 tables:
Resulting in following associations:
:profile) and Profile
:skills) and Skill
My search feature will show users whith
profile.introduction, or having one or more skills matching the search term.
My problem here is the
one-to-many realtionship between
I’m thinking to create a denormaized table or a view just for this search feature.
tsv column (to store the concatenation of all skills names of a given user) . This way everytime an user adds, removes or updates a skill the
tsv column will be updated accordingly.
Please do you think this is an acceptable solution or what would you suggest me instead?
Edit: I’m not finding the
general programming category so I put my question in the
members only one.
Edit 2: So as suggested by @dimitarvp I moved my question to
Elixir category and added
Ecto tags. There is no
Ecto dedicated category apparently.