Of course referential integrity belongs at the database, the database has to be responsible for ensuring the data is as valid as posisble.
Scenario: I put my business logic in my database. I find I have performance issues. I tune, I solve some, I buy more hardware, I solve more issues. Now my customer base tripples (or quadruples) and my database is slow again. Now how do I scale?
A - Buy more hardware - cause we all know how cost effective those 32 proc Itanium 2s can be.
B - Spend untold amounts of money re-designing the database for partitioning.
or my preferred method
All "Business logic" goed into the app servers, the only API to the data is through the app servers. Anyone who touches data without going through the app servers doesn't work for me any more. When my app servers need to scale I buy *more* app servers. they're cheap, they are web servers, serving web services.
I've worked on too many databases over the years with all this "Business logic" built in and when you hit your performance ceiling the only option is to buy bigger because scaling out is nearly impossible. One company I worked for grew their customer base 20 fold over 4 years. IT has to move FAST to keep up with that level of growth.
Michael R. Schmidt