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?

58 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. 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
  5. Excellent Post. In fact, I'm making it a sticky so other can find it later. Thanks!
    animal crossing

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


    seo services in lahore

    ReplyDelete
  7. 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
  8. thanks for the tips and information..i really appreciate it..

    digital marketing agency in lahore

    ReplyDelete
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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

  16. 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
  17. When student buy dissertation writing services with Pro Dissertation, get reliable and best dissertation writing services at an affordable cost.

    ReplyDelete
  18. 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

  19. I do not even know how I ended up here, but I thought this post was great.
    I don't know who you are but certainly you are going to a famous blogger if you aren't already ;) Cheers!

    Please Visit My homepage ➤ 오피

    (freaky)

    ReplyDelete
  20. There are a lot of blogs over the Internet. But I can surely say that your blog is amazing in all. It has all the qualities that a perfect blog should have.
    Best SEO Company in Lahore

    ReplyDelete
  21. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
    Digital Marketing Services in Pakistan

    ReplyDelete
  22. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
    Best Web Development Company in Lahore

    ReplyDelete
  23. Finest blog! I would like to thank for the efforts you have made in writing this post. Hopefully that you will write many more posts like this one. If you're an AOL advanced plan user and you want to Install AOL Desktop Gold software, this blog provides you a quick and easy process by which you can install it in a very short time.

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. Pretty portion of content. I simply stumbled upon your weblog and in accession capital
    to say that I acquire in fact loved account your weblog posts.
    Anyway I will be subscribing to your feeds
    or even I success you access consistently fast.
    고스톱

    ReplyDelete
  26. Hi to all, it’s in fact a nice for me to pay a visit this web page, it consists of useful Information
    I constantly spent my half an hour to read this web site’s content daily along with a cup of coffee.
    thank you for this informative post.
    토토사이트

    ReplyDelete
  27. Digisol hub is a one stop digital marketing solution for all your online and offline marketing needs. We provide our clients with the best digital marketing strategies!
    to help them grow their business.

    ReplyDelete
  28. Personally, if all web owners and bloggers made good content as you did, the net will be much more useful than ever before. You might also like walmart carpet cleaner rental near switzerland 

    ReplyDelete
  29. I am happy to be here and this wonderful blog. I have found here lots of important information for my knowledge I need. Thanks for sharing this amazing post. If you want to Recover Spectrum Email Server Not Working please contact roadrunner support team for solution.

    ReplyDelete
  30. هل تبحث عن اكبر افضل شركة اثاث مكتبي في مصر هناك الكثير من الشركات انصحك بشركة ستار وود.

    ReplyDelete
  31. Best information team. Get avail your best service regarding essay maker where you will get best content done on time with help of experts who provide you best content on time with as reasonable price.

    ReplyDelete
  32. This makes it important to highlight certain areas that students need to review to identify the best service providers

    ReplyDelete
  33. Great post. I appreciate for your efforts. If you are looking for writing service in UK ,We offer thorough, statistics assignment help
    service.

    ReplyDelete
  34. Keep up the great job on your website, please. I like your post and especially appreciate your ideas on SQL. They're all incredible, and I value your sharing your knowledge with us. I sincerely appreciate it. In any case, I advise hiring english literature dissertation examples aid service writers to do your work if you need dissertation assistance. I truly hope you find this website helpful and are happy with the outcomes after using this service.

    ReplyDelete
  35. Thankyou for sharing such informative SQL blog.

    ReplyDelete
  36. Excellent post. SQL is very useful for those students who are learning drawing on windows and want to become web designer. Now it's time to avail Siding Services In Alachua County FL for more information.

    ReplyDelete
  37. Awesome post. Thanks to sharing your information, I appreciate for your efforts and your work. If you are Looking for a toy shop online Dubai for your Kids, Dubai Toys Wholesale Store is best option .

    ReplyDelete
  38. Nice post. Really I appreciate for your work. Babes N Buddies provide Dog Food In Noida. With a signature blend of wholesome meat, fresh vegetables, and nutritious grains, this premium dog food will keep your pup feeling energized and happy all day long.

    ReplyDelete
  39. I just wanted to take a moment to thank you for your wonderful blog. Your content is always of high quality, and I find it both informative and interesting. Your dedication to providing great information is truly appreciated, and I look forward to reading more of your posts. Keep up the fantastic work
    separation agreement in virginia

    ReplyDelete
  40. Dragon Fruit Plant requires specific growing conditions. It prefers well-drained soil with a slightly acidic pH level. The plant can tolerate drought, but it requires regular watering, especially during the flowering and fruiting stages. It thrives in full sunlight but can also grow in partially shaded areas. The Dragon Fruit plant is a climbing cactus and requires support, such as trellises or stakes, to help it grow upright.

    ReplyDelete
  41. Stantander Login: A Safe and Convenient Approach. Embrace Novuna Personal Finance for Sound Money Management. @ stantander login

    ReplyDelete
  42. Hello, I read your blog which is very good. Thanks for sharing this information.
    Looking for SPSS Assignment Help? Our expert team provides comprehensive assistance with SPSS assignments, ensuring accurate analysis and interpretation of data. Get top-notch guidance and achieve academic success with our reliable SPSS assignment help services.

    ReplyDelete
  43. Looking for a New Jersey Divorce Lawyer, Our expert team is here to help your challenging time.

    ReplyDelete
  44. Amazing, Your blogs are really good and informative. I got a lots of useful information in your blogs. 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 Motorcycle Accident Lawyer Virginia. It is very great and useful to all. Keeps sharing more useful blogs...

    ReplyDelete
  45. This" is an instructive blog that plans to give significant bits of knowledge, tips, ley de divorcio nueva jersey and assets to improve the growth opportunity. It covers a great many instructive subjects, from powerful review techniques to training innovation and then some. Whether you're an understudy, instructor, or anybody energetic about realizing, this blog offers an abundance of data to assist you with capitalizing on your instructive excursion new jersey divorce litigation.

    ReplyDelete
  46. The evolution of SQL into a Turing-complete language marks a significant milestone in the realm of databases and programming. This transformation empowers SQL, traditionally known for its role in managing and querying relational databases, with the capability to perform complex computations and solve a broader range of computational problems. The newfound Turing completeness allows SQL to handle recursive queries, conditional branching, and iterative processes, expanding its scope beyond data manipulation to encompass more advanced programming tasks. This enhancement opens doors for developers and data engineers, offering greater flexibility and the ability to execute more intricate algorithms directly within SQL, further solidifying its position as a powerful and versatile language in the field of data management and analysis.
    motorcycle accident attorney near me
    commercial truck accident lawyers

    ReplyDelete
  47. Such clever blog work, Keep doing this kind of post, I support you

    ReplyDelete
  48. I’ve been following this web site. Thank you for providing a fine content!!!

    ReplyDelete
  49. Continue for sharing such a excellent post here. Keep on sharing, Thanks

    ReplyDelete
  50. This is a tremendous post Keep up the great work. Sharing is nice keep it up

    ReplyDelete
  51. "Valued Lessons" is a thought-provoking book that skillfully weaves insightful lessons into an engaging narrative. The author's ability to impart wisdom through relatable characters and compelling storytelling is commendable. Each chapter unfolds a new layer of valuable insights, making it a truly enriching read. The universal themes explored in "Valued Lessons" resonate deeply, leaving readers with a sense of reflection and newfound perspectives. This book is a treasure trove of wisdom, seamlessly blending entertainment with profound life lessons. New York Divorce No Fault

    ReplyDelete

Blog Archive

Google Analytics