[Info-Ingres] String Manipulations
Emiliano
emile at iris-advies.nl
Mon Mar 19 15:32:57 CDT 2007
On 2007-03-19, Gibson Jonathan <Jonathan.Gibson at hiscox.com> wrote:
> I'm with Ian on this one. Paul's example would fit perfectly well into
> the BL layer of a SOA deployment but to do the same in the database
> would result in every data transaction being scrutinised to this rule.
> Personally, I want my database tuned for retrieving data as quickly as
> possible whilst ensuring data integrity.
For those instances, there's MySQL ;) Sorry, that wasn't nice.
But what this is saying to me is that data validity has lower priority
than performance. In such a case I'd reason that you don't have
business rules but business guidelines. Which is perfectly OK if
that's a decision you make knowing the potential consequences.
If performance is all that matters, a replicated read-only copy might
be a good middle ground. SQL Server has snapshots for exactly this
scenario, although that does mean you don't have up-to-the-minute
data. But fast it is.
> There's a fine line between
> this type of business logic and referential integrity and constraints.
I don't see any structural difference at all. They're just
higher-level constraints, but they're all constraints. Why would a FK
be more important than a date of birth that's later than date of
death?
> The other advantage about placing your business logic in a separate
> layer such as in a SOA deployment, is that it largely becomes
> database/application agnostic. When the logic is to be applied across
> many back end systems, do you maintain the logic in each database or in
> one central layer?
That's a very good point, but if you have related data living in fully
separate databases, you have some serious issues to deal with in the
first place (unless the relations don't really matter, and then you
wouldn't have needed BL in the DB in any case). I've dealt with a simple
version of this, and *all* data access *was* through proxy objects
(non-networked SOA, you might say), and the poxy 'virtual database'
got corrupted at the drop of a hat.
--
Emiliano
More information about the Info-Ingres
mailing list