Hey guys, I'm designing a database for a basic social media app and ran into this issue:
I have a likes table with a foreign key of user ID and post ID, and was wondering if when a user unlikes a post:
Should I:
- Completely remove the like at the unlike action
OR - Set a T/F flag for likes that were already made. So if a user unlikes, the like they made with that specific post gets marked with F until they like it again.
I would assume deleting it and making a new one is the correct path, but I'm also not sure about how it can impact performance or data integrity.
Thanks in advance!