As far as I know, foreign keys (FK) are used to aid the programmer to manipulate data in the correct way. Suppose a programmer is actually doing this in the right manner alr
They are not strictly necessary, in the way that seatbelts are not strictly necessary. But they can really save you from doing something stupid that messes up your database.
It's so much nicer to debug a FK constraint error than have to reconstruct a delete that broke your application.
FKs are very important and should always exist in your schema, unless you are eBay.
Suppose a programmer is actually doing this in the right manner already
Making such a supposition seems to me to be an extremely bad idea; in general software is phenomenally buggy.
And that's the point, really. Developers can't get things right, so ensuring the database can't be filled with bad data is a Good Thing.
Although in an ideal world, natural joins would use relationships (i.e. FK constraints) rather than matching column names. This would make FKs even more useful.
I can't imagine designing a database without foreign keys. Without them, eventually you are bound to make a mistake and corrupt the integrity of your data.
They are not required, strictly speaking, but the benefits are huge.
I'm fairly certain that FogBugz does not have foreign key constraints in the database. I would be interested to hear how the Fog Creek Software team structures their code to guarantee that they will never introduce an inconsistency.
If you plan on generating your data access code, ie, Entity Framework or any other ORM you entirely lose the ability to generate a hierarchical model without Foreign Keys
Foreign keys help enforce referential integrity at the data level. They also improve performance because they're normally indexed by default.