<div>I'm coming in late on this thread having really valued following&nbsp;the discussion.</div>
<div>&nbsp;</div>
<div>Much of the difficulty in this area focusses around the simple thought that wrong things may be attempted on the db. And that the DB should do some of the thinking for the application. So much of the logic applied server side is designed to sort that out. 
</div>
<div>&nbsp;</div>
<div>Is there any appeal to objective philosophical logic that points to any overall approach that spares us the intellectual burden of having to trouble shoot problems and&nbsp;&nbsp;that perhaps should not exist or matters that need to be solved serverside?
</div>
<div>&nbsp;</div>
<div>Knuth and other early logicticians propose what&nbsp;became simply termed the &quot;rubbish in rubbish out&quot; principle. It seems that in flow dynamics it is better to sort rubbish out before it goes &quot;down stream&quot;, so that you avoid having to send anything &quot;up stream&quot; calling for changes. 
</div>
<div>&nbsp;</div>
<div>Many&nbsp;people of that era&nbsp;thinking&nbsp;through this stuff&nbsp;held the thought that each isloatible unit should have its own integrity. Hance Knuth's TeX approach in page layout which is in its own way, the storage and qualifying of data. The format of TeX assumes though that the 'user' has already pre-processed the actual&nbsp;data and it is warrantable for deployment.
</div>
<div>&nbsp;</div>
<div>So I have been thinking alot about this stuff from the view that each level of the process should only be passing 'data' on to the next that is in all senses pure and appropriate. Now people will immeadiatley say that can not work for multi-development-client applications utilising a common database.
</div>
<div>&nbsp;</div>
<div>To that I would make the suggestion&nbsp;of a &nbsp;server abstraction layer which requires that an application must send a verifying &quot;key&quot; that asserts that the post has the integrity required by the standard set for the process. Not&nbsp;just a password alone, the purpose being to focuss the developer to implement internally all necessary requirements prior to posting. These requirements can available &nbsp;following the Java strategy pointed out earlier.
</div>
<div>&nbsp;</div>
<div>Perhaps then logic and checks db side should only be as&nbsp;minimal as possible -&nbsp;essential enough to ensure the basic integrity of the db is actually maintained.</div>
<div>&nbsp;</div>
<div>Would this&nbsp;perhaps effectively build applications which were to a high degree abstractable from the underlying database in use?</div>
<div>&nbsp;</div>
<div>Paul</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 07/06/06, <b class="gmail_sendername">Neven MacEwan</b> &lt;<a href="mailto:neven@mwk.co.nz">neven@mwk.co.nz</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Kurt<br><br>I have to agree with Kyley that clearly the definition of a business<br>rule is in dispute. This reminds me that a few years ago I tried to find
<br>a definition of a 'business object' and only suceeded in finding what it<br>wasn't, namely a row of data in a RDB. Also by your definition you could<br>implement all business rules in the RDB, which you can't! for example a
<br>business may have well defined rules for resolving a many-to-many<br>relationship (The most common implementation of this is an open item<br>transaction ledger) but the best the RDB can you is enforce RI.<br><br>I call the rules that protected the data DI (Data Integrity) this covers
<br>RI, Constraints, Calculated Columns (Intra Row and Aggregated) you can<br>include State Checking (ie we cannot edit this record as it is locked).<br>But in my experience as much as you put in the DB you cannot implement a
<br>business there IMHO<br><br>Neven<br><br><br><br><br>kurt wrote:<br>&gt; Neven MacEwan wrote:<br>&gt;&gt; All the constraint/ri ui code can a) be extracted out of the DB or b)<br>&gt;&gt; be autogenerated from metadata
<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&gt; Where does referential integrity end and business logic begin anyway?<br>&gt;<br>&gt;&nbsp;&nbsp;- a database is a collection of constraints<br>&gt;&nbsp;&nbsp;- a business rule is a constraint<br>&gt;<br>&gt;&gt; firstly I make the distinction in the respect that a change in
<br>&gt;&gt; business rules should not alter your ri, the difference is breaking ri<br>&gt;&gt; would result in &quot;what the sh#t is this&quot;, breaking business rules<br>&gt;&gt; results in &quot;should we be allowing this sh#t&quot;
<br>&gt;<br>&gt;<br>&gt; I don't see the difference : referential integrity is one<br>&gt; (the most common) way of implementing business rules.<br>&gt;<br>&gt; &quot;unique index on client ID&quot; is a simple RI statement,
<br>&gt; that enforces the rule that client ID's are unique within<br>&gt; that set of data, no?<br>&gt;<br>&gt;<br>&gt;&gt; Its basically the same mismatch that exists between an OO system and a<br>&gt;&gt; Relational Database, it all goes away if you accept/assume that a row
<br>&gt;&gt; of a table is a class instance persisted, the question is should you?<br>&gt;<br>&gt; Nope. Class = Type ;)<br>&gt;<br>&gt;<br>&gt; Cheers, Kurt.<br>&gt; _______________________________________________<br>&gt; Delphi mailing list
<br>&gt; <a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br>&gt; <a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><br>&gt;<br>&gt;<br><br>--<br>Neven MacEwan (
B.E. E&amp;E)<br>Ph. 09 620 1356 Mob. 027 4749 062<br><br>New Address Details<br>===================<br>MWK Computer Systems<br>1 Taumata Rd<br>Sandringham<br>Auckland<br><br>Ph 620 1356<br>Fx 620 1336<br><br><br>_______________________________________________
<br>Delphi mailing list<br><a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br><a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><br><br><br><br></blockquote>
</div><br>