[DUG] Stored procedures and business logic
Neven MacEwan
neven at mwk.co.nz
Wed Jun 7 09:10:16 NZST 2006
Kurt
I have to agree with Kyley that clearly the definition of a business
rule is in dispute. This reminds me that a few years ago I tried to find
a definition of a 'business object' and only suceeded in finding what it
wasn't, namely a row of data in a RDB. Also by your definition you could
implement all business rules in the RDB, which you can't! for example a
business may have well defined rules for resolving a many-to-many
relationship (The most common implementation of this is an open item
transaction ledger) but the best the RDB can you is enforce RI.
I call the rules that protected the data DI (Data Integrity) this covers
RI, Constraints, Calculated Columns (Intra Row and Aggregated) you can
include State Checking (ie we cannot edit this record as it is locked).
But in my experience as much as you put in the DB you cannot implement a
business there IMHO
Neven
kurt wrote:
> Neven MacEwan wrote:
>> All the constraint/ri ui code can a) be extracted out of the DB or b)
>> be autogenerated from metadata
>>
>> > Where does referential integrity end and business logic begin anyway?
>
> - a database is a collection of constraints
> - a business rule is a constraint
>
>> firstly I make the distinction in the respect that a change in
>> business rules should not alter your ri, the difference is breaking ri
>> would result in "what the sh#t is this", breaking business rules
>> results in "should we be allowing this sh#t"
>
>
> I don't see the difference : referential integrity is one
> (the most common) way of implementing business rules.
>
> "unique index on client ID" is a simple RI statement,
> that enforces the rule that client ID's are unique within
> that set of data, no?
>
>
>> Its basically the same mismatch that exists between an OO system and a
>> Relational Database, it all goes away if you accept/assume that a row
>> of a table is a class instance persisted, the question is should you?
>
> Nope. Class = Type ;)
>
>
> Cheers, Kurt.
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
--
Neven MacEwan (B.E. E&E)
Ph. 09 620 1356 Mob. 027 4749 062
New Address Details
===================
MWK Computer Systems
1 Taumata Rd
Sandringham
Auckland
Ph 620 1356
Fx 620 1336
-------------- next part --------------
A non-text attachment was scrubbed...
Name: neven.vcf
Type: text/x-vcard
Size: 164 bytes
Desc: not available
Url : http://ns3.123.co.nz/pipermail/delphi/attachments/20060607/6dbb86b6/neven.vcf
More information about the Delphi
mailing list