I'm creating a website where people can share and upload things, but I want to add a like/recommend button. I want to check that if the user has recommended something or not, so they can't spam click it. I had an idea of how to do it: I had a column called 'recby' for each post and I would store a list of users who had recommended that post separated by commas. Then I learned about normalisation.
How would I do this whilst sticking to normalisation?
You add a table storing the likes for you:
PostID | UserID
---------------
5 | 6
5 | 15
6 | 8
Something like this. Now you have one entry for each like while keeping everything normalized.