I'm quite new to databases and SQL. I have an assignment, but I don't know how to solve this.
Let's say I have table named Persons. It has following columns: userId (primary key), userName and tags.
Tags is another table, containing only id and tagName. Person can have multiple tags, for example: "football", "cooking" etc.
Each tag corresponds to Tag table row. But I'm not sure how to achieve this kind of relation. How can I achieve this?
I'm guessing it has to something to do with foreign keys and making persons tag column an array of foreign keys.