Hello Robert,
It's a tough question without using specific project. There is no one right
answer that you have to follow, because everything could be absolutely different
in different projects.
BAL and DB is different types of logic. DB validations are more pointed to
the checking constraints on the physical level and checks in BAL are specific
to the logic of business. First one is more severe, because it is concerned
to the tables’ relations. Second is weaker, because business logic could
be different, and in one project smth could be prohibited and in other is
not.
In general validations are in both levels, based on optimistic approach -
validate if it really necessary and if it doesn't breaks/harms you
Take into account the performance issue - the closes client validation -
the fastest (because there are less interprocess/interlayers calls)
But take into account security issues, to avoid you system being hacked.
PS: I recommend u to read this article
http://www.lhotka.net/WeBlog/PermaLi...82a58f2b9.aspx
Lhotka is an expert in what relates to the business logic
RBHI all,
RB>
RBHaving a discusion with a colegue.
RBWhere is the best place to keep validatations, in the database
RBlayer, i on
RBthe SQL server via triggers, SP etc; or at the application layer,
RBThis being a C# group I gather that the bias would be towards the
RBAPL,
RBbut what , in you minds are the pro's and con's
RBThanks
RBRobert
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche