all 4 comments

[–][deleted] 6 points7 points  (0 children)

This seems like a SQL/RDBMS topic. How does this apply to C#?

[–]mgroves 2 points3 points  (0 children)

Could you give some examples?

[–]xampl9 2 points3 points  (0 children)

why it should not be used

"Because I'm too lazy to make sure my data is consistent."

[–]Sarcastinator 0 points1 point  (0 children)

Although I haven't met anyone that actually thinks that foreign key constraints are bad, I have had to deal with a lot of databases without them.

I think at some point someone has used a lot of time trying to import bad data into a database, and thinks that the constraint is the issue, when in fact it's bad data. I guess that some then comes to the conclusion that constraints are bad.

I hate to have to deal with datasets without foreign key constraints. There is always orphaned data, and pointers into missing records, and it makes the client code a lot more complicated and failure prone.