If I want to make sure that there are unique columns by user_id
and notification_id
. Should I use UNIQUE
constraint on that two columns and (eventualy) set id
as PRIMARY KEY
or set these two columns as PRIMARY KEY
and remove id
column?
This is how table should look:
Column Type
----------------------------------
id int(11)
user_id int(11)
notification_id int(11)
col3 varchar(255)
...