<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Application logic in the database</title>
	<atom:link href="http://www.dbms2.com/2005/12/15/application-logic-in-the-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dbms2.com/2005/12/15/application-logic-in-the-database/</link>
	<description>Choices in data management and analysis</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:22:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Curt Monash</title>
		<link>http://www.dbms2.com/2005/12/15/application-logic-in-the-database/#comment-223</link>
		<dc:creator>Curt Monash</dc:creator>
		<pubDate>Fri, 23 Dec 2005 16:35:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/?p=39#comment-223</guid>
		<description>Eric,

A &quot;rules engine&quot; is basically what used to be an &quot;expert system shell.&quot;  Indeed, some of the products of that era, like Aion&#039;s and Neuron Data&#039;s, are still around in some form (the latter at Fair Isaac).  They were designed for diagnosis, selection, configuration, and similar classes of problems.  E.g.:

1.  What disease does this person have?
2.  What antibiotic should I give this person (a classic one, underlying MYCIN and thus EMYCIN and thus Teknowledge&#039;s product)?
3.  What wine should I serve (the stupid industry default demo, popularized by Teknowledge -- I proposed combining #2 and #3 and having an &quot;Illegal Drug Advisor&quot;, but nobody took me up on it)?
4.  What parts need to be included in the shipment of this VAX?  (A hugely successful one.  The engine was DEC&#039;s R1, as in &quot;I wanted to be Knowledge Engineer and now I are one.)
5.  Who should I grant credit to?  (A hugely successful one at American Express, powered by Inference&#039;s RETE-algorithm engine ART.  They&#039;re the guys whose glossary had the definition &quot;Recursion:  See &lt;em&gt;recursion.&lt;/em&gt;&quot;)
6.  How should I price airline seats?  (A hugely successful one.)

Despite some big wins, this technology never went mainstream, but it&#039;s still with us in some niches today.</description>
		<content:encoded><![CDATA[<p>Eric,</p>
<p>A &#8220;rules engine&#8221; is basically what used to be an &#8220;expert system shell.&#8221;  Indeed, some of the products of that era, like Aion&#8217;s and Neuron Data&#8217;s, are still around in some form (the latter at Fair Isaac).  They were designed for diagnosis, selection, configuration, and similar classes of problems.  E.g.:</p>
<p>1.  What disease does this person have?<br />
2.  What antibiotic should I give this person (a classic one, underlying MYCIN and thus EMYCIN and thus Teknowledge&#8217;s product)?<br />
3.  What wine should I serve (the stupid industry default demo, popularized by Teknowledge &#8212; I proposed combining #2 and #3 and having an &#8220;Illegal Drug Advisor&#8221;, but nobody took me up on it)?<br />
4.  What parts need to be included in the shipment of this VAX?  (A hugely successful one.  The engine was DEC&#8217;s R1, as in &#8220;I wanted to be Knowledge Engineer and now I are one.)<br />
5.  Who should I grant credit to?  (A hugely successful one at American Express, powered by Inference&#8217;s RETE-algorithm engine ART.  They&#8217;re the guys whose glossary had the definition &#8220;Recursion:  See <em>recursion.</em>&#8220;)<br />
6.  How should I price airline seats?  (A hugely successful one.)</p>
<p>Despite some big wins, this technology never went mainstream, but it&#8217;s still with us in some niches today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.dbms2.com/2005/12/15/application-logic-in-the-database/#comment-221</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 23 Dec 2005 15:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/?p=39#comment-221</guid>
		<description>&lt;blockquote&gt;But more general use of stored procedures has been very problematic, due to the lack of development support for writing and maintaining them in any comprehensive way. Basically, stored procedures have been database-resident spaghetti.&lt;/blockquote&gt;Agreed. It&#039;s easy to do wrong, and takes discipline to do right. With better languages for declaring constraints, some of it would go away; and better pattern-based languages (e.g. Haskell and its like) might also make it easier to determine which function to call, for example based on a &quot;resultset&quot; (relation/query result).
&lt;blockquote&gt;(Eric’s response in that thread is particularly good.)&lt;/blockquote&gt;Thanks!
&lt;blockquote&gt;1. As noted above, putting logic in the database, to the extent the tools are good, has been a good thing. If the tools are indeed better now, it may become a better thing.&lt;/blockquote&gt;Certainly constraints need to be associated closely with the data, for correctness. Those constraints have different (though I think largely derivable and predictable) implications to application and UI tiers... yet while the CASE tools you mention have been around, I&#039;m disappointed there aren&#039;t more frameworks in the mainstream languages for generating code to consistently manifest those constraints across tiers.
&lt;blockquote&gt;2. The myth that an application is just database-logic-plus-the-obvious-UI has been with us for a LONG time. It’s indeed a myth, for several reasons. There’s business process, for one thing.&lt;/blockquote&gt;Although that&#039;s also a tricky term. Are you referring to a sequence of CRUD operations?
&lt;blockquote&gt;For another, UIs aren’t as trivial as that story would make them sound.&lt;/blockquote&gt;Not at all... and while objects might be good for building UI solutions, that doesn&#039;t hold that UIs somehow need to have data expressed as &quot;objects&quot; (rather than, say, relations). A sufficiently powerful data abstraction like relations would work well for UIs, and for application code.
&lt;blockquote&gt;Plus there are many apps for which a straightforward relational/tabular database design doesn’t make sense anyway. (That’s a primary theme of this blog.)&lt;/blockquote&gt;Even with such apps (though we&#039;d probably disagree on their needs), declarative constraints would be useful. For example, with an XML schema one can derive a basic functional editor for documents of that type. If XML Schema were stronger, you&#039;d have even more such capabilities (although you arrive quickly at embedding relational-type notions, like keys (ID/IDREF), which becomes a near-abomination).
&lt;blockquote&gt;3. It’s really regrettable that the term “business rules” is used so carelessly. It conflates integrity constraints and general application logic.&lt;/blockquote&gt;Couldn&#039;t agree more - it&#039;s almost meaningless, and can be used with terms like &quot;pattern&quot; to try to justify utter nonsense.
&lt;blockquote&gt;Within application logic, it conflates those which are well served by a development and/or implementation paradigm along the line of a rules engine, and those for which a rules engine would make little sense. It’s just bad semantics.&lt;/blockquote&gt;A rules engine is an interesting topic - how do you see a rules engine different from a DBMS with full/better declarative integrity constraints? Or from &quot;table-driven programming&quot;? One difference I can think of is data transitions - while you can write DBMS triggers to control data state transitions, it&#039;s awkward. A better DBMS would have support for that.
&lt;blockquote&gt;4. Besides everything else, I mainly agree with SAP’s belief that the DBMS is the wrong place to look for module interfaces&lt;/blockquote&gt;I think I agree - are you saying that the data cross over functional module boundaries?</description>
		<content:encoded><![CDATA[<blockquote><p>But more general use of stored procedures has been very problematic, due to the lack of development support for writing and maintaining them in any comprehensive way. Basically, stored procedures have been database-resident spaghetti.</p></blockquote>
<p>Agreed. It&#8217;s easy to do wrong, and takes discipline to do right. With better languages for declaring constraints, some of it would go away; and better pattern-based languages (e.g. Haskell and its like) might also make it easier to determine which function to call, for example based on a &#8220;resultset&#8221; (relation/query result).</p>
<blockquote><p>(Eric’s response in that thread is particularly good.)</p></blockquote>
<p>Thanks!</p>
<blockquote><p>1. As noted above, putting logic in the database, to the extent the tools are good, has been a good thing. If the tools are indeed better now, it may become a better thing.</p></blockquote>
<p>Certainly constraints need to be associated closely with the data, for correctness. Those constraints have different (though I think largely derivable and predictable) implications to application and UI tiers&#8230; yet while the CASE tools you mention have been around, I&#8217;m disappointed there aren&#8217;t more frameworks in the mainstream languages for generating code to consistently manifest those constraints across tiers.</p>
<blockquote><p>2. The myth that an application is just database-logic-plus-the-obvious-UI has been with us for a LONG time. It’s indeed a myth, for several reasons. There’s business process, for one thing.</p></blockquote>
<p>Although that&#8217;s also a tricky term. Are you referring to a sequence of CRUD operations?</p>
<blockquote><p>For another, UIs aren’t as trivial as that story would make them sound.</p></blockquote>
<p>Not at all&#8230; and while objects might be good for building UI solutions, that doesn&#8217;t hold that UIs somehow need to have data expressed as &#8220;objects&#8221; (rather than, say, relations). A sufficiently powerful data abstraction like relations would work well for UIs, and for application code.</p>
<blockquote><p>Plus there are many apps for which a straightforward relational/tabular database design doesn’t make sense anyway. (That’s a primary theme of this blog.)</p></blockquote>
<p>Even with such apps (though we&#8217;d probably disagree on their needs), declarative constraints would be useful. For example, with an XML schema one can derive a basic functional editor for documents of that type. If XML Schema were stronger, you&#8217;d have even more such capabilities (although you arrive quickly at embedding relational-type notions, like keys (ID/IDREF), which becomes a near-abomination).</p>
<blockquote><p>3. It’s really regrettable that the term “business rules” is used so carelessly. It conflates integrity constraints and general application logic.</p></blockquote>
<p>Couldn&#8217;t agree more &#8211; it&#8217;s almost meaningless, and can be used with terms like &#8220;pattern&#8221; to try to justify utter nonsense.</p>
<blockquote><p>Within application logic, it conflates those which are well served by a development and/or implementation paradigm along the line of a rules engine, and those for which a rules engine would make little sense. It’s just bad semantics.</p></blockquote>
<p>A rules engine is an interesting topic &#8211; how do you see a rules engine different from a DBMS with full/better declarative integrity constraints? Or from &#8220;table-driven programming&#8221;? One difference I can think of is data transitions &#8211; while you can write DBMS triggers to control data state transitions, it&#8217;s awkward. A better DBMS would have support for that.</p>
<blockquote><p>4. Besides everything else, I mainly agree with SAP’s belief that the DBMS is the wrong place to look for module interfaces</p></blockquote>
<p>I think I agree &#8211; are you saying that the data cross over functional module boundaries?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

