I hope somebody can edit my title to better describe what I mean, because I don't know exactly what this would be called. However, consider this setup: I want to create a notification system, where a message is displayed to a user until he clicks "dismiss". I then need to "remember" that this user has dismissed the notification so I don't show it to him again. Here is my current solution
users
table has auid
primary key and user infonotifications
table has anid
primary key and notification textnotifications_seen
table with two columns,uid
andnid
When somebody clicks dismiss on a notification, I store their uid
and the notification's nid
in notifications_seen
. This seems to work fine, but phpMyAdmin has giant red messages telling me that notifications_seen
does not have an index. However, neither column is unique. Should I really have an extra utterly useless column in notifications_seen
and call that a primary key? Is there a better way to do this?