I've learned. I'll share.

August 26, 2009

SQL is now turing complete!

David Fetter at Oscon 2009 just made a stunning claim: With CTE and Windowing, SQL is Turing Complete. He even offers a proof and an amazing example (although I'm not sure if the example requires turing completeness, it's still amazing).

This could be a big deal. Why? It means that you can do anything in an SQL query. While drawing the mandlebrot set is a nice demo, the first "killer app" will be tree traversal. Lots of relational tables end up looking like trees and are a royal pain to deal with in normal SQL. After that, only our imagination (and performance) is the limit. You can theoretically create any data view that runs in the DB all in one shot, without any of the troubles of stored procedures.

I see a similarity between turing-complete SQL in the DB and JavaScript on the browser. For years, we used JavaScript to do silly stuff, but then a few bright minds created amazing tools like gmail and google maps and our view of JavaScript was forever changed. Now JavaScript is everywhere and there's a race to make the best development framework and engines fastest engines.

Might the same thing happen with turning-complete SQL? is the race on to be the first programming language to compile down to turing-complete SQL?.

Honestly, if I were a betting man, I'd say it won't come to anything significant. But I'll also guess that the lure of compiling down to SQL will eventually capture someone, somewhere. It's only a matter of time. In fact, if you're a programming language geek, the sirens are probably calling to you right now :). When it does happen, I expect the first language to be a functional one, especially one with a small core, like a variant of lisp. Once we get clojure in clojure, maybe it will be a candidate. Or maybe C# will end up with LINQ-to-turning-complete-SQL (SQLINQ?).

What do you think?

65 comments:

  1. Is the resultant SQL still truly declarative? It will take someone cleverer than me to answer that question - but if it is - then this is a very interesting thing indeed.

    ReplyDelete
  2. From what I read on the netz the following two statements are equal: "This programming language is declarative","There is a DEFINED one-to-one correspondence between written code and produced machine instructions", so in that case since the compiler is not yet written i doubt it's standardized, and hence the language is declarative.

    ReplyDelete
  3. what do I think? reminds me of what Prolog had already accomplished. Then came SQL that didn't nest non-deterministically deep. Then came SPARQL that I guess tried to again take a page from Prolog to add that aspect back in. What's wrong with Prolog? Why do we have to call it other things?

    ReplyDelete
  4. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi
    cara menggugurkan kandungan
    obat penggugur kandungan
    obat telat datang bulan

    ReplyDelete
  5. SQL is very useful for those students who are learning drawing on windows and want to become web designer.I am a writer of phd dissertation writing services and I write all types of Assignments.

    ReplyDelete
  6. We are amongst the Best Mobile App Development Company in Mumbai that offer IOS, Android Mobile Application Development services that look Great and act Smart.
    Mobile app development company in mumbai

    ReplyDelete
  7. Excellent Post. In fact, I'm making it a sticky so other can find it later. Thanks!
    animal crossing

    ReplyDelete
  8. Nice Information Your first-class knowledge of this great job can become a suitable foundation for these people. I did some research on the subject and found that almost everyone will agree with your blog.
    Cyber Security Course in Bangalore

    ReplyDelete
  9. Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!
    Cyber Security Training in Bangalore

    ReplyDelete
  10. this is really nice to read..informative post is very good to read..thanks a lot!


    seo services in lahore

    ReplyDelete
  11. I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts.


    seo company in lahore

    ReplyDelete
  12. thanks for the tips and information..i really appreciate it..

    digital marketing agency in lahore

    ReplyDelete
  13. It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks.

    Web App Development Services UAE

    ReplyDelete
  14. Thanks For sharing this Superb article.I use this Article to show my assignment in college.it is useful For me Great Work.
    Software Development Company UAE

    ReplyDelete
  15. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

    Custom Website Development in UAE

    ReplyDelete
  16. Paper Lords provide Assignment Writing Services. Paper Lords, best Academic Writing Services take charge and produce a paper that will provide you coursework help should be completed.

    ReplyDelete
  17. Paper Lords provide Assignment Writing help. Paper Lords, best Academic Writing Services take charge and produce a paper that will provide you coursework help should be completed.

    ReplyDelete
  18. Paper Lords is here to provide Best Essay Writing Service, our best essay writing service in UK is written by highly qualified essay writers, feel free to contact us and take our services.

    ReplyDelete
  19. Paper Lords provide best Best Course Writing Service. our coursework writing service in UK produce a paper that will provide you a coursework help in your academic career

    ReplyDelete
  20. Need dissertation writing service in UK, Paper Lords are providing best dissertation writing service with premium quality dissertation writers to help in your dissertation

    ReplyDelete
  21. Acquire custom dissertation help from Paper Lords! Our Top dissertation writing services are trusted by the students in the UK due to its best quality.

    ReplyDelete
  22. Paper Lords provide best Thesis Writing Services in UK, we have quality thesis writers who provide best Thesis Writing Services in UK feel free to contact us and get your thesis

    ReplyDelete
  23. Pro Dissertation Writing provide Top dissertation writing services in UK. Pro Dissertation Writing is here to provide quality-based dissertation writing services to help students getting over the pressure situation.

    ReplyDelete
  24. Pro Dissertation Writing provide Top dissertation writing help in UK. Pro Dissertation Writing is here to provide quality-based dissertation writing services to help students getting over the pressure situation.

    ReplyDelete

  25. Our academic dissertation writing services aim to help all students cater to all the educational requirements. Our academic dissertation writing services by natives are capable of preparing quality paper for all the tasks

    ReplyDelete
  26. Pro Dissertation Writing provide best custom dissertation help, being fully aware of the fact that for students it is the toughest task ahead. Our team of best dissertation writing services in the UK is here to assist you throughout the process.

    ReplyDelete
  27. Pro dissertation writing provides best online marketing dissertation. Students find it difficult to deal with marketing dissertation writing. This is where our writing professionals play their role.

    ReplyDelete
  28. Economics dissertation help you to achieve your dream Handling an economics dissertation can be challenging to handle many students seeking for an economics dissertation help.

    ReplyDelete
  29. We have the quality centric, and tailored sociology dissertation services, our sociology dissertation editors will ensure your dissertation and give their best.

    ReplyDelete
  30. Students want to develop the impression by delivering the best abstract dissertation. Get abstract dissertation writing by our pro dissertation professionals.

    ReplyDelete
  31. Top Expert Dissertation Writer. Our dissertation writing service will help you write your PhD dissertation or Master's thesis within the shortest time frame.

    ReplyDelete
  32. As far as Bachelor Dissertation Writing Services is concerned, Pro Dissertation Writing provide finest Bachelor Dissertation Writing Services We know the students problems and thus we resolve their issues related to bachelor dissertation.

    ReplyDelete
  33. Are you facing trouble in creating the perfect history dissertation writing topics? We provide best history dissertation writing services which will assist you in that.

    ReplyDelete
  34. Looking for art dissertation help by industry experts. Pro dissertation Art dissertation help UK is most popular and offer the most reliable and quality services.

    ReplyDelete
  35. There is no need to worry more and panic because the Business Dissertation Help is now within your reach. Pro Dissertation Writing provide Best Business Dissertation Help.

    ReplyDelete
  36. We have collaborative and fully customized Ph.D. dissertation writing services. Our Ph.D. dissertation writing services include title creation, and proposals, and all chapters.

    ReplyDelete
  37. If you hired professional English literature dissertation writing expert, you could release stress from extensive writing English literature dissertation helps from professionals and submit a well compiled.

    ReplyDelete
  38. When student buy dissertation writing services with Pro Dissertation, get reliable and best dissertation writing services at an affordable cost.

    ReplyDelete
  39. Nursing dissertation writing requires professionals to fulfill all quality requirements, Nursing Dissertation Writing UK, Pro dissertation is the best place to concern all dissertation needs.

    ReplyDelete
  40. Pro Dissertation Writing has the best writers on the job for providing accounting dissertation writing services in UK. We make accounting thesis look super-easy.

    ReplyDelete
  41. Pro Dissertation Writing is the premium Master's Dissertation Writing Services Masters dissertation writing services in UK focusing on standardized master thesis writing.

    ReplyDelete
  42. Pro dissertation Writing provide best MBA Dissertation Writing Services. Pro Dissertation writers make sure that you accomplish your goal in that regard with ease.

    ReplyDelete
  43. Our philosophy dissertation writing services handle the dissertation on any topic. We are the leading philosophy dissertation service providers. Our expert team is dedicated to helping you achieve your dream.

    ReplyDelete
  44. Research Publisher in UK is Providing the Reliable Publishing Solution to the Researcher, Universities, Libraries, Authors Research Publisher in UK, Knight Noble Publisher Solutions

    ReplyDelete
  45. Our company’s editorial board Review your research paper applies the Best Proofreading Service in UK, our best proofreading service in UK ensure that your Research Paper is prepared by following the appropriate criteria.

    ReplyDelete
  46. Reach out your targeted audience through our Research Advertising in UK strategies KNP research advertising in UK helps many researchers to connect with scientist.

    ReplyDelete
  47. The funding organizations helps to find the open research funds in UK opportunities for research work and also for undergraduate and masters partnerships.

    ReplyDelete
  48. Thanks for sharing this.,
    Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    Scrum master certification

    csm certification

    certified scrum master certification

    certified scrum master

    agile scrum master certification

    scrum master certification cost

    csm certification cost

    Scrum master Training

    Scrum master

    Best Scrum master certification

    ReplyDelete

Blog Archive

Google Analytics