Say that you have a diagram of a table, such as: friends(friendship_id, uid1, uid2, are_friends).
When one friend is friends with another person, is it better to delete this row from the database (and reset auto-increment)? Or should you just change the status of are_friends to "N" ?
I would like to know what you think and why.
EDIT: My main concern is to show some information about the status of friends, and also to show who is friend. Thus, during the upload, I can notify each other about a friendly request, but so far you have no friends.
I initially had are_friendsas big ENUMwith a lot of options. But in this ENUMI had such options as removedand blocked, and I was not sure whether it was really useful data or not. Any further thoughts essentially have more or less data?
Also, the added question that I have had since I posted is how to avoid duplication of friendships. Should you make a (uid1, uid2)primary key?
source
share