ã¢ããªéçºè ããã®DBåå¼·ä¼ããããããã¨ããããã
çµè«
SQLãã©ã¼ã®ãã¼ã¿ã®æã¡æ¹ããã¼ã®ã¨ããã¢ããªéçºå´ã®è©±é¡ãã¡ã¤ã³ã®DBåå¼·ä¼ããããããããããã¨ãã話
以ä¸è£è¶³
ã³ã³ãã³ã
- ã¢ããªéçºè ãDBãæ¡ããªããã°ãªããªãæ代
- DBãæ¡ãã¨ãããã¨
- åå¼·ä¼ã«ã¤ãã¦
ã¢ããªéçºè ãDBãæ¡ããªããã°ãªããªãæ代
ãã¼ã¿ççºã®æ代
ãã¼ã¿ççºã®æ代ãããã¨è¨ããã¦ä¹ ããã§ããæ±ããã¼ã¿ã®éãå¢ãã¦ãã¦ããã ãã§ãªãããã¼ã¿ã®æ§é ãå¤ç¨®å¤æ§ã«ãªã£ã¦ãã¦ããã¨æãã¦ãã¾ããããã¾ã§ã¯One Size Fits Allã§RDBã対å¿ãã¦ããã®ããå¢å ãè¤éåãã¦ãããã¼ã¿ã«RDBã®ã¿ã§ã¯å¯¾å¿ããããªããªã£ã¦ãã¦ããçºã«NoSQLã®ãããªãããã¯ããçãã«éçºããå©ç¨ããã¦ãã¾ãã
ã¢ããªéçºè ã¨ãã¦ããã¹ããã¨
ãããã£ãæ代ãè¿ããã«ããã£ã¦ãã¢ããªéçºè ã¯ä½ãåããªãã¦ãããã§ããããï¼DBã¯ã¤ã³ãã©/ãµã¼ãã¼ã¨ã³ã¸ãã¢ã®ãã®ï¼
åã¯ãDBã«å¯¾ãã¦ï¼ãã¼ã¿ã«å¯¾ãã¦ï¼ã¢ããªéçºè ãæ¡ãé åãå¢ãããã¨ãããã¨ã ã¨èãã¦ãã¾ãã
DBãæ¡ãã¨ãããã¨
RDBã§SQLãæ¸ãã¨ããé¸æ
æ¯è¼çã¢ããªå´ããç´æ¥ãã¼ã¿ãæ±ããããªã¢ã¼ããã¯ãã£ã«ãªã£ã¦ããKVSãããã¥ã¡ã³ãæåãªNoSQLã«æ¯ã¹ãRDBMSã¯SQLã¨ããæ½è±¡çãªå½¢ã§ãããã¼ã¿ãæ±ããªãããã«ãªã£ã¦ãã¾ããããã¯ãªã¬ã¼ã·ã§ãã«ãªãã¼ã¿ã¢ãã«ãæ±ãçºã«ãããªã£ã¦ãã¾ãã
SQLãæ¸ãã«ã¯æ®æ®µã¢ããªãæ¸ãæã¯çµæ§é ã®åãæ¿ããå¿ è¦ãªçºãORMã使ã£ã¦ãªãã¸ã§ã¯ãæåã§æ±ããããã«ããã®ã主æµã§ã*1ã
ã§ããããªã¬ã¼ã·ã§ãã«ãªãã¼ã¿ãä¸æãæ±ãçºã«ã¯ãã®çºã«ä½ãããSQLã§æ¸ããæ¹ãããå ´é¢ãå¤ãããORMはオワコンãããããSQLはLLã ãããªã®ã§ãDBãæ¡ãããã¢ããªã¨ã³ã¸ãã¢ã¯RDB使ãã¨ãã¯ããã£ã¨ã«ã¸ã¥ã¢ã«ã«çSQLã使ãã¨ããããããªããã¨æãã¾ãã
RDBMSã使ãã¨ãããã¨ã¯å·¨äººã®è©ã«ä¹ããã¨
RDBMSã¯ãSQLã§æ¬²ãããã¼ã¿ã宣è¨çã«æ¸ãã¦ããã¨ãä¸ã®äººã§ãããã©ã³ã/ãªããã£ãã¤ã¶ããã¼ã¿ã®ç¶æ³ãã¤ã³ããã¯ã¹ã®å¼µãæ¹ã«ãããã¦ãããªã«å®è¡è¨ç»ãçµãã§ãããä»çµã¿ã«ãªã£ã¦ãã¾ãããã®ä»çµã¿æ ã«ã©ãå®è¡ãããããç´æ¥ã³ã³ããã¼ã«ã§ããªãã¦æ±ãã¥ããé¢ãããã¾ãããåã¯ããã¯ã¾ãã«å·¨äººã®è©ã«ä¹ãã¨ãããã¨ã ã¨æã£ã¦ãã¾ãã
ãã©ã³ã/ãªããã£ãã¤ã¶ã«ã¯ãã¼ã¿ã®åãæ±ãã«é·ããè¶ äººéã®å¡æºãååã«è©°ã¾ã£ã¦ãã¾ããæããèªåã§æç¶ãçã«ã³ã¼ããæ¸ããã¨ãã¦ãRDBMSã¨åçã®æé©åãè¡ãèªä¿¡ã¯ããã¾ãããä¾ãæ¸ããã¨ãã¦ãSQLãæ¸ãã®ã¨ã¯æ¯è¼ã«ãªããªãæéãå¿ è¦ã«ãªãã¨æãã¾ãã
ããã°ã©ãã³ã°è¨èªã¨ãã¦ã®SQL
ããã«SQLèªèº«ãè¨èªã¨ãã¦å¤§ããªããã³ã·ã£ã«ãæã£ã¦ããã使ãããªããã°ç¹ã«ãã¼ã¿ãæ±ãã¨ãããã¨ã«ããã¦ã¯æè»ã§å¼·åãªè¡¨ç¾ãè¡ããã¨ãã§ãã¾ããè¥å¹²ãã¿æ°å³ã§ãããSQLã®ããã³ã·ã£ã«ã«ã¤ãã¦ã¯ããã辺ãè¦ãã¨ãã®ä¸ç«¯ãæãããã¨ãã§ããã¨æãã¾ãã*2
Brainf*ck in SQL - ぐるぐる~
SQLで数独を解く - y-kawazの日記
...SQLæ¸ããããªãã¾ãããï¼
大äºãªã®ã¯é¸æã§ãããã¨
ãã¡ããRDBMSãNoSQLã«æ¯ã¹ã¦åªãã¦ãããã¨ãããã¨ã§ã¯ããã¾ãããRDBMSãNoSQLã«ã¤ãã¦èããã¨ãã¯ãRDBMS v.s. NoSQLãã§ã¯ãªããRDBMS and NoSQLãããã£ã¨ããã°ãDBMSãã¨ããæ ã§èããã¹ãã§ãã
ãã¼ã¿ãæ±ãä¸ã§ããDBMSãé¸æããã¨ããã®ã¯ã©ãããæå³ãããã®ããæèãããã¨ãããã¨ã§ããããã¦ä½ããããã®ã«ä½µãã¦é©åãªDBMSãé¸æãã*3ãã¨ã§ãããããã§ããã°ã¢ããªéçºè ã¨ãã¦å¤§ããªåã«ãªãã¨æãã¾ãã*4
ãã®çºã®ä¸ç°ã¨ãã¦ãã¢ããªéçºè ã¨ãã¦RDBMSããã£ã¨ä¸æã«*5æ±ããããã«ãªãããã¨å¸¸ã èãã¦ãã¾ããã
åå¼·ä¼ã«ã¤ãã¦
çµç·¯
大ä½ä»¥ä¸ã®ãããªçç±ã§ã¢ããªéçºè ããã®ã«ã¸ã¥ã¢ã«ãªDBã®åå¼·ä¼ããããããªãã¨ä½ã¨ãªãæã£ã¦ãã¾ãããhttp://mysql-casual.org/ãçºæ³ã¨ãã¦ã¯è¿ãã®ã§ãããå 容ãã¿ãã¨ã¤ã³ãã©å¨ãã®è©±é¡ãä¸å¿ãªããã§ããMySQL Casualã«éãããDBã®åå¼·ä¼ã¨ããã¨ã©ããã¦ãã¤ã³ãã©å¨ãã®è©±é¡ãä¸å¿ã«ãªããã¡ã§ããã©ãããæãããã¦ãã¾ããã
ãããªæã勉強会カンファレンス2011*6ã«åå ããã¨ãããããªããã°ä½ãã°ãããããªããã¨ããå¿ã®å£°ãèããã¦ããã®ã§ããããã¨ã«ãã¾ããã
話é¡
対象ã®è©±é¡ã¯å¤§ä½ãããªæãã§ããããï¼
- SQL
- ã¹ãã¢ããã¡ã³ã¯ã·ã§ã³
- ãã¼ã¿ã®æã¡æ¹
- ãã©ã°ã¤ã³ã®æ¸ãæ¹/ä½ã£ã¦ã¿ã
- å®è¡è¨ç»
ä»ã®è©±é¡ãæè¿ã§ãã
DBMS横æçã«ãããã
ã¤ã³ãã©åãã®è©±é¡ã«æ¯ã¹ã¦ãã¢ããªåãã®è©±ãªãDBMSã«ä¾ããªã話ã«ããããããããªããã¨æã£ã¦ãã¾ãã
ãã¡ããå ¨ã¦ã®DBMSã«éãã話ã¯æãããããªã«ãªãã¦ãç¹å®ã®DBMSãåæã¨ãã話ã«å¿ ç¶çã«ãªã£ã¦ããã¨ã¯æãã¾ãããæ®æ®µã¯éãDBMSã«ã¤ãã¦è©±ãèãæ©ä¼ã¯ãã¾ããªãã®ã§ããã¯ããã§èãã¦ã¿ããããããã«ã¯ç°ãªãDBMSã®ã¦ã¼ã¶ã¼éã§äº¤æµã§ãããããªå ´ã«ãªãã°å¬ããã§ãï¼ä¸»ã«åãï¼ã
ã¨ããããRDBããå§ãããã¨æãã¾ãããããããã¯NoSQLãªè©±é¡ãåãå ¥ãã¦ããããã§ããæ¹åæ§ã¯æ¨¡ç´¢ãã¤ã¤è²ã ãã£ã¦ããããã
èªåã¯PostgreSQLçãªã®ã§Postgresããã®è©±ãæä¾ã§ãã¾ãããæ試é¨ã®ããã«DBã¨ããã¤ã¤å®è³ªã¯Postgresã®ãããªãã¨ã«ãªããªãçºã«ãä»ã®DBMS使ãã®æ¹ã®è³åè ã絶è³åéä¸ã§ããOSSããããã©ãåãã¾ããã
ããã«åã ã®DBMSã«ç¹åãã話ã«ãããæã¯æ´¾çããã¦åç§ä¼ãããã°ããã¨æãã¾ãããããåç§ä¼ããããä½ã«æé·ã§ããã°ç´ æ´ãããã§ããã
åååé
åå¼·ä¼ã«ååã¯SQL Casualãããããªã¨æã£ããã§ãããMySQL Casualã¨ä¸¸ãã¶ããªã®ã§å´ä¸ãç´ æµãªååãããã°æãã¦ãã ããã
ææã¨ã人æ°ã¨ã
æªå®ã8æãããã¾ã§ã«ã¯ããããã決ã¾ã£ããããã§/Twitterã§åç¥ãã¾ãã
*1:ã¨æã£ã¦ãããPerlçéã§ã¯id:nekokakããä½ã®DBIx::SkinnyãTengã®ããã«çSQLæåã®ORMãçµæ§æµè¡ã£ã¦ããããã§ããä»ã®è¨èªã ã¨ã©ããªãã§ãããï¼
*2:èªåãSQLでProject Eulerを解くã¨ããæ´»åããã¦ããã®ã§ããæ´æ°ãæ»ã£ã¦ãã¾ããããã¾ããããã
*3:ã¤ã³ãã©/ãµã¼ãã¼ã¨ã³ã¸ãã¢ããªããããã«ããã¨ããã¨ã§ã¯ãªãã¦ãã¢ããªéçºå´ããã®æè¦ãæä¾ã§ãããã¨ãããã¨
*4:次のMongoDB勉強会ã§ã¯ãã®è¾ºã話ããããªãã¨æã£ã¦ã¾ããèå³ãæãæ¹ã¯ã©ããã(æºå¸ã§ããããï¼
*5:ãã¡ããNoSQLã
*6:é常ã«ææ義ãã¤æ¥½ããã¤ãã³ãã§ããï¼ãããã¨ããããã¾ããï¼