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
[email protected]
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
begin:vcard
fn:Neven MacEwan
n:MacEwan;Neven
email;internet:[EMAIL PROTECTED]
tel;work:649 620 1356
tel;fax:649 620 1336
tel;cell:0274 749 062
version:2.1
end:vcard

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to