{"id":145,"date":"2004-06-09T12:47:59","date_gmt":"2004-06-09T18:47:59","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=145"},"modified":"2007-01-07T23:04:43","modified_gmt":"2007-01-08T05:04:43","slug":"plsql","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/145","title":{"rendered":"PL\/SQL"},"content":{"rendered":"<p>I recently wrote a basic data transformation program using <a href=\"http:\/\/java.sun.com\/\">Java<\/a> and <a href=\"http:\/\/otn.oracle.com\/tech\/pl_sql\/index.html\">PL\/SQL<\/a>. I hadn&#8217;t used PL\/SQL (which is an Oracle-specific procedural language for stored procedures) since writing a basic data layer for my first professional project (a Yahoo! like application written in PL\/SQL, <a href=\"http:\/\/www.perl.com\/\">perl<\/a> and <a href=\"http:\/\/www.vignette.com\/\">Story Server<\/a>&#8211;don&#8217;t ask).  Anyway, revisiting PL\/SQL reminded me of some of the things I liked and disliked about that language.<\/p>\n<p>I like:<\/p>\n<p>Invalidation of dependencies.  In PL\/SQL, if package A (packages are simply arbitrary, hopefully logical, groups of procedures and functions) calls package B, A <em>depends<\/em> on B.  If the signatures of B are recompiled (you can separate the signatures from the implementations) package A simply won&#8217;t run until you recompile it.  This is something I really wish other languages would pick up, because it at least lets you know when something you depend on has changed out from under you.<\/p>\n<p>I dislike:<\/p>\n<p>The BEGIN and END blocks, which indicate boundaries for loops and if statements, are semantically no different than the { and } which I&#8217;ve grown to love in perl and Java.  But for some reason, it takes me back to my pascal days and leaves a bit of a bad taste in my mouth.<\/p>\n<p>I&#8217;m unsure of:<\/p>\n<p>The idea of putting business logic in a database.  Of course, schemas are intimately tied to the business layer (ask anyone trying to move to a different one) and anyone who pretends that switching databases in a java applications is a simple matter of changing a configuration file is smoking crack, but the putting chunks of business logic in the data layer introduces a few problems.  Every different language that you use increases the complexity of a project&#8211;and to debug problems with the interface between them, you need to have someone who knows both.  Also, stored procedures don&#8217;t fit very well into any of the object relational mapping tools and pretty much force you to use jdbc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently wrote a basic data transformation program using Java and PL\/SQL. I hadn&#8217;t used PL\/SQL (which is an Oracle-specific procedural language for stored procedures) since writing a basic data [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,6],"tags":[],"class_list":["post-145","post","type-post","status-publish","format-standard","hentry","category-oracle","category-programming"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=145"}],"version-history":[{"count":0,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}