Andrej Koelewijn

  • Home
  • About
  • Departments
    • cloud
    • java
    • mobile
    • open standards
    • oracle
    • oss
    • other
    • soa
    • software development
    • tablet
    • Uncategorized
    • web
  • Subscribe via RSS

SQL is a DSL

October 27th, 2008  |  Published in oracle  |  9 Comments

Sometimes it seems like programmers will do everything to avoid SQL. At the same time DSLs (Domain Specific Languages) are very popular. If DSLs are so great, why are you trying to avoid SQL? Or procedural extensions to SQL? SQL is a DSL for dealing with relational data.

SQL was invented to deal with relational data, there aren’t many better, easier and faster ways to deal with large amounts of data stored in a relational database. Seriously, databases are made to handle large amounts of data. To sort it, to filter it, etc. Trying to do that in another language, or even worse, in another layer, makes no sense. It’s really expensive to move the data from the database into your middleware layer, and Java (or any other middleware language) isn’t really a good language to sort and filter large amount of data.

Procedural extensions to SQL, like for example Oracle’s pl/SQL, are even worse off. It seems like middleware programmers will do everything not to have to use a procedural language in the database. But fact is that pl/sql is a very good tool to write data heavy business logic in. There is no faster way to handle large amounts of data, then right there in the database. And there is no easier way to write data heavy procedural code than using a procedural extension to SQL. That is what pl/sql is: a DSL for writing data centric logic.

Added bonus: anything in the database is extremely reusable. Almost every language has a library which allows you to make use of relational databases. So, if you put it in the database, no matter what middleware or frontend language you’re going to use in the future, your data centric logic can be reused.

Share and Enjoy:
  • del.icio.us
  • Google Bookmarks
  • DZone
  • SphereIt
  • StumbleUpon
  • Technorati
  • LinkedIn
  • HackerNews
  • PDF
  • Digg
  • Facebook
  • FriendFeed
  • Posterous
  • Tumblr
  • Twitter
  • RSS
  • Igor
    I absolutely agree with you. For some reason SQL got a bad rap among Java developers. Apparently it's not object-oriented enough.

    Existing frameworks promise to shield Java developers from SQL which is a shame and produces some monstrously inefficient applications.

    I believe that database and SQL queries and stored procedures are the most long-lived part of the application. Business logic that uses it would change more frequently and UI has the shortest live span.

    From this perspactive, I think the tools and developers that approach database design from Java side are doing it backwards.
  • Toon
    Well said. There is hope still.
  • Jan
    Off course you are right provided that a customer does have Oracle's RDBMS to start of with. In a scenario where it is unclear or uncertain what the actual database platform will be - for instance for standard applications that want to provide functionality instead of just serving data - staying away for vender specific SQL (like non-standard JDBC types, and procedural extensions) is a good thing.

    In cases where the database *is* Oracle's RDBMS I don't have a problem using Oracle's extensions like PL/SQL as long as it is only data related.
  • Robert Young
    Java, web, KiddieKoders are stupid. full stop. They write COBOL, in lower case, and are convinced they are doing something new and different. They iterate through a lump of data just as COBOL coders do through a copybook. They should be strung up by their heels and flogged.
  • SQL Tutorials
    Does anyone know if there is another language or set of commands beside SQL for talking with databases?

    I'm working on a project and am doing some research thanks
  • SQL Tutorials
    You know, the thing about SQL is, that there is virtually nothing that can replace it.

    Does anyone know if a substitute exists for sql? I mean besides MS SQL and Oracle and all that jazz. Thanks.
  • akoelewijn
    This article mentions some alternative query languages: Web and Semantic Web Query Languages: A Survey .
blog comments powered by Disqus

Tags

bi bpel camel cep css dsl esb esper google governance grails groovy gtalk html5 innovation internet ipad ivy java javascript jaxrs jersey jigsaw jquery linkeddata linux middleware mule noiv openoffice openweb oracle osgi oss plsql rdbms rest smack soa sql sun tablet web 2.0 xmpp yql

Archives

  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Recent Posts

  • So you think it’s the iPad that’s missing features?
  • iPad is THE couch-device
  • Will they still like tablet 2.0?
  • Do you know who your customers are?
  • Usability: a must have, not a nice to have

Categories

  • cloud
  • java
  • mobile
  • open standards
  • oracle
  • oss
  • other
  • soa
  • software development
  • tablet
  • Uncategorized
  • web

Recent Comments

  • andrej on So you think it’s the iPad that’s missing features?
  • Dave on So you think it’s the iPad that’s missing features?
  • andrej on So you think it’s the iPad that’s missing features?
  • Fernando on So you think it’s the iPad that’s missing features?
  • andrej on So you think it’s the iPad that’s missing features?

RSS Friendfeed

  • SublimeVideo: Demoing the Future of HTML5 Video February 7, 2010
    andrej koelewijn SublimeVideo: Demoing the Future of HTML5 Video - http://www.readwriteweb.com/archive... 14 hours ago from Google Reader - Comment - Like […]
    FriendFeed
  • The War on Interruptions, an Excerpt from “Switch: How to Change Things When Change Is Hard” February 7, 2010
    andrej koelewijn The War on Interruptions, an Excerpt from “Switch: How to Change Things When Change Is Hard” - http://www.techcrunch.com/2010... 21 hours ago from Google Reader - Comment - Like […]
    FriendFeed
  • RT @edwk: Building HTML5 Webapps http://bit.ly/aamFgK some great tips #html5 February 7, 2010
    andrej koelewijn RT @edwk: Building HTML5 Webapps http://alexbosworth.net/post... some great tips #html5 yesterday from Twitter - Comment - Like […]
    FriendFeed
  • Alex Bosworth's Weblog - Building HTML5 Webapps February 7, 2010
    andrej koelewijn Alex Bosworth's Weblog - Building HTML5 Webapps - http://alexbosworth.net/post... yesterday from Google Reader - Comment - Like […]
    FriendFeed
  • Beautiful Motion Graphics Created With Programming: Showcase, Tools and Tutorials February 7, 2010
    andrej koelewijn Beautiful Motion Graphics Created With Programming: Showcase, Tools and Tutorials - http://www.smashingmagazine.com/2010... yesterday from Google Reader - Comment - Like […]
    FriendFeed
  • New Whitepaper: Architecting for the Cloud: Best Practices February 6, 2010
    andrej koelewijn New Whitepaper: Architecting for the Cloud: Best Practices - http://aws.typepad.com/aws... Saturday from Google Reader - Comment - Like […]
    FriendFeed
  • The Future of Web Content – HTML5, Flash & Mobile Apps February 6, 2010
    andrej koelewijn The Future of Web Content – HTML5, Flash & Mobile Apps - http://www.techcrunch.com/2010... Saturday from Google Reader - Comment - Like […]
    FriendFeed
  • The Days of Miracles and Wonder February 6, 2010
    andrej koelewijn The Days of Miracles and Wonder - http://www.eod.com/blog... Saturday from Google Reader - Comment - Like […]
    FriendFeed
  • AT AT Walking with CSS February 5, 2010
    andrej koelewijn AT AT Walking with CSS - http://ajaxian.com/archive... Friday from Google Reader - Comment - Like […]
    FriendFeed
  • “Ultimate Mashup” a Glimpse into the Future February 5, 2010
    andrej koelewijn “Ultimate Mashup” a Glimpse into the Future - http://blog.programmableweb.com/2010... Friday from Google Reader - Comment - Like […]
    FriendFeed


©2010 Andrej Koelewijn
Powered by WordPress using the Gridline Lite theme by Graph Paper Press.