I need a searchable database with messages, which I can attach tags to, and see whether they have been used, when and where.
For example, I got the following message "Hi! I live in Stockholm and are looking for a handyman. I saw in your profile that you own a toolbox and since I don't own any tools myself, except for a screwdriver, I was hoping that hiring you would be the best since yo can bring your own tools! Please contact me ASAP!"
To this message, I want to attach the tags "Stockholm, handyman, toolbox, screwdriver and tools".
When searching the database, I wish to be able to find all messages containing the tags "Stockholm" and "Toolbox".
If I then decide to use this message above, and use it, I want to be able to set that it was used 2018-02-11 11.52 using the name "John Doe" at the site "findahandyman.site".
Now, this is all fictional, I will use completely different messages with other tags, places etc. But the scenario is real. However, I am not sure what way to do this best would be.
I am thinking like this:
tbl-tags
----------
|id | tag |
----------
tbl-messages
--------------
| id | message |
--------------
tbl-used
-------------------------
| id | date | name | site |
-------------------------
And then build a view where I can search the messages, registered with the tags #1 #2 #3 etc.
Am I thinking right? If I am, how can I relate them all and how to build the view. If I am not, how should I think? And also, how to relate them all and build the view according to your suggestion(s)?