As Bruno said, if you want a quick solution that works, you should use the Tagger extra.
If you want to program it yourself with MIGXdb for learning purposes, I suggest the following.
- For a quick introduction to MIGXdb watch this video on youtube.
- For the schema takes some inspiration from the schema that Tagger uses.
You’ll need to create at least two database tables. One for the tags and a pivot table for the many-to-many relationship between the resources and the tags. The handling of a many-to-many relationship in MIGXdb can be tricky. Read this thread for an example on how to do it.