Should I use a foreign key for “balanceimpact” that only has two options either “CREDIT” or “DEBIT”?
Does it even make sense, there are only two options here?
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.
It’s not so much as how many options there are, but what kind of rel this is (1:1; 1:n; etc).
On this particular case, I wouldn’t use a foreign key, just leave it as a column.
Also, as Marc_S suggested on his comment, add a CHECK constraint to ensure that only one of those 2 values are entered.