SQLの話

2,544 views

Published on

SQL is Turing-complete

Published in: Automotive, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,544
On SlideShare
0
From Embeds
0
Number of Embeds
965
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • SQLの話

    1. 1. SQLの話闇鍋プログラミング勉強会
    2. 2. @choplin Web/DBエンジニア 現実
    3. 3. SQLはDBのデータを操作する為のDSL と思っていませんか?
    4. 4. オールドタイプ
    5. 5. SQLはチューリング完全
    6. 6. 大事なことなので後二回言います
    7. 7. SQL輝かしい歴史
    8. 8. Year Name Alias Comments1986 SQL-86 SQL-87 First formalized by ANSI.1989 SQL-89 FIPS 127-1 Minor revision, adopted as FIPS 127-1.1992 SQL-92 SQL2, FIPS 127-2 Major revision (ISO 9075), Entry Level SQL-92 adopted as FIPS 127-2.1999 SQL:1999 SQL3 Added regular expression matching, recursive queries, triggers, support for procedural and control-of-flow statements, non-scalar types, and some object- oriented features.2003 SQL:2003 SQL 2003 Introduced XML-related features, window functions, standardized sequences, and columns with auto-generated values (including identity-columns).2006 SQL:2006 SQL 2006 ISO/IEC 9075-14:2006 defines ways in which SQL can be used in conjunction with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. In addition, it enables applications to integrate into their SQL code the use of XQuery, the XML Query Language published by the World Wide Web Consortium (W3C), to concurrently access ordinary SQL-data and XML documents.[29]2008 SQL:2008 SQL 2008 Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers. Adds the TRUNCATE statement.[30]2011 SQL:2011 http://en.wikipedia.org/wiki/SQL より
    9. 9. Year Name Alias Comments1986 SQL-86 SQL-87 First formalized by ANSI.1989 SQL-89 FIPS 127-1 Minor revision, adopted as FIPS 127-1.19921999 SQL-92 SQL:1999 SQL3 CASE Expressionrecursive queries, triggers, support for SQL2, FIPS 127-2 Major revision (ISO 9075), Entry Level SQL-92 adopted as FIPS 127-2. Added regular expression matching, procedural and control-of-flow statements, non-scalar types, and some object- oriented features.2003 SQL:2003 SQL 2003 Introduced XML-related features, window functions, standardized sequences, and columns with auto-generated values (including identity-columns).2006 SQL:2006 SQL 2006 ISO/IEC 9075-14:2006 defines ways in which SQL can be used in conjunction with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. In addition, it enables applications to integrate into their SQL code the use of XQuery, the XML Query Language published by the World Wide Web Consortium (W3C), to concurrently access ordinary SQL-data and XML documents.[29]2008 SQL:2008 SQL 2008 Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers. Adds the TRUNCATE statement.[30]2011 SQL:2011 http://en.wikipedia.org/wiki/SQL より
    10. 10. Year Name Alias Comments1986 SQL-86 SQL-87 First formalized by ANSI.1989 SQL-89 FIPS 127-1 Minor revision, adopted as FIPS 127-1.19921999 SQL-92 SQL:1999 SQL3 CASE Expressionrecursive queries, triggers, support for SQL2, FIPS 127-2 Major revision (ISO 9075), Entry Level SQL-92 adopted as FIPS 127-2. Added regular expression matching, Recursive Query procedural and control-of-flow statements, non-scalar types, and some object- oriented features.2003 SQL:2003 SQL 2003 Introduced XML-related features, window functions, standardized sequences, and columns with auto-generated values (including identity-columns).2006 SQL:2006 SQL 2006 ISO/IEC 9075-14:2006 defines ways in which SQL can be used in conjunction with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. In addition, it enables applications to integrate into their SQL code the use of XQuery, the XML Query Language published by the World Wide Web Consortium (W3C), to concurrently access ordinary SQL-data and XML documents.[29]2008 SQL:2008 SQL 2008 Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers. Adds the TRUNCATE statement.[30]2011 SQL:2011 http://en.wikipedia.org/wiki/SQL より
    11. 11. Year Name Alias Comments1986 SQL-86 SQL-87 First formalized by ANSI.1989 SQL-89 FIPS 127-1 Minor revision, adopted as FIPS 127-1.19921999 SQL-92 SQL:1999 SQL3 CASE Expressionrecursive queries, triggers, support for SQL2, FIPS 127-2 Major revision (ISO 9075), Entry Level SQL-92 adopted as FIPS 127-2. Added regular expression matching, Recursive Query non-scalar procedural and control-of-flow statements, non-scalar types, and some object- oriented features.2003 SQL:2003 SQL 2003 types Introduced XML-related features, window functions, standardized sequences, and columns with auto-generated values (including identity-columns).2006 SQL:2006 SQL 2006 ISO/IEC 9075-14:2006 defines ways in which SQL can be used in conjunction with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. In addition, it enables applications to integrate into their SQL code the use of XQuery, the XML Query Language published by the World Wide Web Consortium (W3C), to concurrently access ordinary SQL-data and XML documents.[29]2008 SQL:2008 SQL 2008 Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers. Adds the TRUNCATE statement.[30]2011 SQL:2011 http://en.wikipedia.org/wiki/SQL より
    12. 12. 構造化定理• 逐次• 分岐• 繰り返し
    13. 13. 構造化定理 => サブクエリ• 逐次 WITH句• 分岐• 繰り返し
    14. 14. 構造化定理 => サブクエリ• 逐次 WITH句• 分岐 => CASE式• 繰り返し
    15. 15. 構造化定理 => サブクエリ• 逐次 WITH句• 分岐 => CASE式• 繰り返し => 再帰クエリ
    16. 16. SQLはチューリング完全
    17. 17. PostgreSQL
    18. 18. 実例一素因数分解
    19. 19. Demo
    20. 20. 実例二Grass
    21. 21. Grassとは?λ計算ベースの関数型言語http://www.blue.sky.or.jp/grass/
    22. 22. Demohttp://choplin.github.com/blog/2012/03/07/grass-on-sql/
    23. 23. ついでに
    24. 24. ほむほむhttp://d.hatena.ne.jp/yuroyoro/20110601/1306908421
    25. 25. Demo
    26. 26. 結論
    27. 27. SQLはチューリング完全
    28. 28. ありがとうございました

    ×