when i foreign reference a table, is there any point in declaring that column as unique?
I mean of course that column which I’m referencing to is unique.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, picture the following scenario:
Table 1’s id field is your foreign key. It is a unique index.
Now there are two possibilities with table 2.
1) table_1_id is not unique
2) table_1_id is unique