i search a lot about this question in stackoverflow..there are same problem as me but didnt soloved my problem.
i created a table which has user in it..columns are somthing like this
uid
username
name
family
....
now i need to create a black list which will store userid of blacklisted person.i dont know how to create this table because each person can have many black listed person then the black list table is somthing like this
uid = 1
blacklistid = 3
uid = 1
blacklist equal 4
then in this case i dont have any primary key which i think it’s wrong.if i insert a primary key in auto incerement mode i will have a very big int and why should i need this primary key?for what reason?i asked someone and he told me maybe your design have a problem
then i need to know how to design this case?
The primary key in the blacklist table is the combination of the user id and the blacklisted id.
The combination of user_id and target_id should be unique.
There is no need for an auto-incrementing id field.