MySQL architecture for different word clouds

by Dennis   Last Updated May 23, 2018 20:06 PM

I want to create a word cloud on my website based on the keywords people search.

I have one free text input field where something can be entered. I have 3 different user types on my website (anonymous, users, organizations). And I want to keep create a wordcloud on the most searched keywords for all these 3 types separately.

I was wondering what is the best architecture for MySQL to accomodate this problem.

Is it better to save all user types in 1 table and keep a "user_type" field? Or is it better to create a different table for each user type (for performance reasons?)?

As well, longer term-wise, I would like to use the user's searching history to provide better results for him. So to avoid rework later, I think it's good that I already have it linked to a specific user_id already right now.

Can anyone suggest me a mysql architecture for this issue? I am thinking of going the way as suggested by user @Derek Downey in this post. With adding a user_id in the DateofSearchTerm table.

Related Questions

Search functionality using joins

Updated April 27, 2015 23:02 PM

Mysql: does full-text cover normal index?

Updated October 11, 2017 18:06 PM