<?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: SmartDB as of 2018-08-21	</title>
	<atom:link href="https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/</link>
	<description>Database-centric development</description>
	<lastBuildDate>Wed, 08 Nov 2023 02:22:30 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/feed/"/>
	<item>
		<title>
		By: Peter Nosko		</title>
		<link>https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7805</link>

		<dc:creator><![CDATA[Peter Nosko]]></dc:creator>
		<pubDate>Mon, 03 Sep 2018 18:23:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=8867#comment-7805</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7782&quot;&gt;Bryn&lt;/a&gt;.

I like the idea of making the jacket subprogram (&quot;Pkg.Bulk_Insert&quot; in the slide) a little smarter. I&#039;m also thinking out loud here. I&#039;m unclear on the purpose of issuing a rollback at the start of an autonomous transaction. There is nothing to rollback. And it leaves a pending transaction silently pending.

In any case, SmartDB should require making sure an API is smart enough to not commit something unknowingly handed to it. In our current application, I caught ourselves making human mistakes of committing data that wasn&#039;t part of the transaction (while doing other things in other SQL Developer windows). But I also didn&#039;t want to issue a rollback without giving it due consideration. What I decided to do is have the API (if it might change the database) explicitly start a transaction. If it succeeds, things may proceed safely. If it fails, the error is logged and re-raised, passing it back to the caller to handle.

I&#039;d welcome feedback on this alternate idea. Maybe Bryn&#039;s idea that leaves a pending transaction as-is is more flexible. I&#039;d still like to know the intent of that initial rollback.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7782">Bryn</a>.</p>
<p>I like the idea of making the jacket subprogram (&#8220;Pkg.Bulk_Insert&#8221; in the slide) a little smarter. I&#8217;m also thinking out loud here. I&#8217;m unclear on the purpose of issuing a rollback at the start of an autonomous transaction. There is nothing to rollback. And it leaves a pending transaction silently pending.</p>
<p>In any case, SmartDB should require making sure an API is smart enough to not commit something unknowingly handed to it. In our current application, I caught ourselves making human mistakes of committing data that wasn&#8217;t part of the transaction (while doing other things in other SQL Developer windows). But I also didn&#8217;t want to issue a rollback without giving it due consideration. What I decided to do is have the API (if it might change the database) explicitly start a transaction. If it succeeds, things may proceed safely. If it fails, the error is logged and re-raised, passing it back to the caller to handle.</p>
<p>I&#8217;d welcome feedback on this alternate idea. Maybe Bryn&#8217;s idea that leaves a pending transaction as-is is more flexible. I&#8217;d still like to know the intent of that initial rollback.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Philipp Salvisberg		</title>
		<link>https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7792</link>

		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 02 Sep 2018 16:24:38 +0000</pubDate>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=8867#comment-7792</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7790&quot;&gt;John&lt;/a&gt;.

These are interesting thoughts. Thanks for sharing.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7790">John</a>.</p>
<p>These are interesting thoughts. Thanks for sharing.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: John		</title>
		<link>https://www.salvis.com/blog/2018/08/28/smartdb-as-of-2018-08-21/#comment-7790</link>

		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Sun, 02 Sep 2018 10:59:38 +0000</pubDate>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=8867#comment-7790</guid>

					<description><![CDATA[To me the “SmartDB” and “Hard-Shell” paradigms are two separate ideas that are being conflated.

I considered the definitions here part of the “Hard Shell” paradigm rather than the “SmartDB”. These definitions just seem to be changing the interface or representation of the data in the database from relations to be operated on by SQL statements, to procedural modules. Although there may be intimations from doing this, they are not logical deductions from these statements.

I considered a “SmartDB” to be one that fully implemented a data model within the DBMS; where a data model meets the definition specified in Codd’s paper Data Models in Database Management:
&lt;blockquote&gt;...a combination of three components:

 	a collection of data structure types (the building blocks of any database that conforms to the model);
 	a collection of operators or inferencing rules, which can be applied to any valid instances of the data types listed in (1), to retrieve or derive data from any parts of those structures in any combinations desired;
 	a collection of general integrity rules, which implicitly or explicitly define the set of consistent database states or changes of state or both.

&lt;/blockquote&gt;
So that any business rule that could be implemented within the DBMS as an integrity constraint, either declaratively as an SQL constraint or assertion or programmatically using triggers would be.

This, I thought, was also the basis of Toon’s Helsinki Declaration which stated that data logic should be moved into the DBMS; and his and Lex’s book “Applied Mathematics for Database Professionals” which showed a method to implement this.

I could stop at this point safe in the knowledge that no-one could unwittingly compromise the integrity of the data within the database.

Or the “Smart DB” could be extended by implementing a “Hard Shell” to address other requirements, such as performance, where as much additional business logic as possible is implemented within stored procedures in the DBMS.

So, in summary:

 	A “SmartDB” is one in which a data model is fully implemented within the DBMS using declarative or programmatic integrity constraints.
 	A “Hard Shell” is one in which as much business logic as possible in implemented within stored procedures, and calling stored procedures is the only access outside-of-the-database code can make.
]]></description>
			<content:encoded><![CDATA[<p>To me the “SmartDB” and “Hard-Shell” paradigms are two separate ideas that are being conflated.</p>
<p>I considered the definitions here part of the “Hard Shell” paradigm rather than the “SmartDB”. These definitions just seem to be changing the interface or representation of the data in the database from relations to be operated on by SQL statements, to procedural modules. Although there may be intimations from doing this, they are not logical deductions from these statements.</p>
<p>I considered a “SmartDB” to be one that fully implemented a data model within the DBMS; where a data model meets the definition specified in Codd’s paper Data Models in Database Management:</p>
<blockquote><p>&#8230;a combination of three components:</p>
<p> 	a collection of data structure types (the building blocks of any database that conforms to the model);<br />
 	a collection of operators or inferencing rules, which can be applied to any valid instances of the data types listed in (1), to retrieve or derive data from any parts of those structures in any combinations desired;<br />
 	a collection of general integrity rules, which implicitly or explicitly define the set of consistent database states or changes of state or both.</p>
</blockquote>
<p>So that any business rule that could be implemented within the DBMS as an integrity constraint, either declaratively as an SQL constraint or assertion or programmatically using triggers would be.</p>
<p>This, I thought, was also the basis of Toon’s Helsinki Declaration which stated that data logic should be moved into the DBMS; and his and Lex’s book “Applied Mathematics for Database Professionals” which showed a method to implement this.</p>
<p>I could stop at this point safe in the knowledge that no-one could unwittingly compromise the integrity of the data within the database.</p>
<p>Or the “Smart DB” could be extended by implementing a “Hard Shell” to address other requirements, such as performance, where as much additional business logic as possible is implemented within stored procedures in the DBMS.</p>
<p>So, in summary:</p>
<p> 	A “SmartDB” is one in which a data model is fully implemented within the DBMS using declarative or programmatic integrity constraints.<br />
 	A “Hard Shell” is one in which as much business logic as possible in implemented within stored procedures, and calling stored procedures is the only access outside-of-the-database code can make.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
