sql.js is an SQL library for javascript containing a version of SQLite compiled for the web.
ãªããSQLã¯éãããªãã®ãï¼ââãSQLããã©ã¼ãã³ã¹è©³è§£ãã®ç¿»è¨³è ãæããåå ã¨å¯¾ç ãSQLããã©ã¼ãã³ã¹è©³è§£ãã®ç¿»è¨³è ã®æ¾æµ¦é¼äººããã«ã8ã¤ã®ãSQLãéãããªãåå ã¨ãã®å¯¾çããèãã¾ãããã·ã¹ãã ã®ããã«ããã¯ã«ãªããããªãåé¡ã®ããSQLããåé¿ãããã¦ãã¦ãå¦ã³ã¾ãããã ãã¼ã¿ã®æä½ãå®ç¾©ãããè¨èªãSQLãã¯ãã©ã®ãããªé åãæ ãã¨ã³ã¸ãã¢ã«ã¨ã£ã¦ãå¿ ä¿®ç§ç®ã§ãããããããã®ä»æ§ããã¡ãã¨ç解ããããã©ã¼ãã³ã¹ã«åªããSQLãæ¸ããæ¹ã¯ããã»ã©å¤ãããã¾ãããåé¡ã®ããSQLãæ¸ãã¦ãã¾ããç¥ãã¬éã«ãããã·ã¹ãã ã®ããã«ããã¯ã«ãªã£ã¦ãã¾ãäºæ ã¯ããçºçãã¾ãã ã§ã¯ãã©ãããã°ããããäºæ ãåé¿ã§ããã®ã§ããããï¼ ãã®ãã¦ãã¦ãå¦ã¶ãããä»åã¯ãSQLããã©ã¼ãã³ã¹è©³è§£ãã®ç¿»è¨³è ã§ãããèªèº«ãã¨ã³ã¸ãã¢ã§ãããæ¾æµ¦é¼äººï¼ã¾ã¤ããã»ã¯ãã¨ï¼@dblmktï¼ããã«8ã¤
SQLãæ¸ãã¦ã¾ããï¼ ãã¨å¤§è¦æ¨¡ãã¼ã¿å¦çã®åéã«ããã¦ã¯SQLã¯ãã¯ãæ¨æºã¤ã³ã¿ã¼ãã§ã¤ã¹ã§ããã åæãããããããã«é¢ãã£ã¦ããçæ§ã¯æ¥ã 大éã®SQLã¯ã¨ãªã¼ãçç£ãã¦ãããã¨ã¨æãã¾ãã ããã§ã¡ãã£ã¨æ°ã«ãªãã®ãã SQLã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã£ã¦ã©ãããã®ãä¸è¬çãªãã ã£ãâ¦â¦ï¼ ã¨ããç¹ã§ãã ã¤ãããã¯SQLãªãã¦O/R mapperã«åããããã¨ãå¤ããããªã®ãã ããã¨ãã³ã¼ããåºãç¯å²ã§å ±æãããã¨ããããããªããããã SQLã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã«ã¤ãã¦è¦èããããã¨ã¯ä»ã®ããã°ã©ãã³ã°è¨èªã«æ¯ã¹ãã¨ã ãã¶å°ãªãã ãã¾ãã¡æ±ºå®çã¨è¨ããã¹ã¿ã¤ã«ããªããªã¨æãã¦ãã¾ãã ãããªããã§æ¬æ¥ã¯ãSQLã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã«ã¤ãã¦ã®æèãæ´»çºåãããã¹ãã ã¯ãã¯ãããã§ãããï¼éæ¨ï¼ã使ã£ã¦ããã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ããç¹å¾´çãªç¹ãç´¹ä»ãããã¨æãã¾ãã ç¹ã«ãåæ
OpenAIã®Whisperæåèµ·ãã25MBå¶éã解決ããPHP, Laravel, ffmpegã使ã£ããã¡ã¤ã«åå²ã®ä¾ OpenAIã®APIã使ã£ãé³å£°ã®æåèµ·ããã¯ãä»ãå¤ãã®ã¢ããªã±ã¼ã·ã§ã³ã§å©ç¨ããã¦ãã¾ãããã®è¨äºã§ã¯ãç¹ã«Whisperæåèµ·ããã®25MBå¶éã«ç¦ç¹ãå½ã¦ãPHP, Laravel, ffmpegâ¦
ããã«ã¡ã¯ããã£ã¬ã¯ã¿ã¼ã®å·åç°ã§ãã ã¯ãã¯ãããã§ãæ°ã«å ¥ãã¬ã·ããä¿åãããMYãã©ã«ããã®ãµã¼ãã¹éçºããä¿åã»è¨é²ã«é¢ããæ°è¦ãµã¼ãã¹ã®æ¤è¨ã»éçºãæ å½ãã¦ãã¾ãã ãã£ã¬ã¯ã¿ã¼ã®ä»äºã¯æ§ã ããã¾ãããä»åã¯ç§ã身ã«ã¤ãããã¨ã§ä»äºé åãåºãã£ãï¼ã¨æãã¦ããSQLã«ã¤ãã¦ã話ããããã¨æãã¾ãã ãããªãã§ãããSQLã使ãã¦ããã£ãç¹ãã¾ã¨ããã¨ä»¥ä¸ã§ãã ããã£ãã㨠æ°å¤æ½åºããåæã¾ã§èªå·±å®çµ ã¨ã³ã¸ãã¢ã¨ã®ã³ãã¥ãã±ã¼ã·ã§ã³ãã¹ã ã¼ãºã« ä»äºãå¢ãã¦ãããã§å®ã¯å¹çã¢ãã å¨å²ã®ç¥ç好å¥å¿ãåºæ¿ ããããå ·ä½ä¾ã交ãã¦ã話ãã¾ãã æ°å¤æ½åºããåæã¾ã§èªå·±å®çµ äºä¾ï¼ï¼ãã°æ§é ãç解ã§ãå¾ã®ä»äºãã¹ã ã¼ãºã« æ¨å¹´ãã¢ããªã®ãµã¼ãã¹éçºãæ å½ããéãã¨ã³ã¸ãã¢ã®è¨å®ãããã°ããå®éã«éä¿¡ããããã©ãããäºåãã§ãã¯ããã¾ãã*1ã ã¢ããªã®ãªãªã¼ã¹ã¯ã¿ã¤ãã³ã°ã決ããã
ãµã¼ãã¹çµäºã®ãç¥ãã ãã¤ãYahoo! JAPANã®ãµã¼ãã¹ããå©ç¨ããã ãèª ã«ãããã¨ããããã¾ãã ã客æ§ãã¢ã¯ã»ã¹ããããµã¼ãã¹ã¯æ¬æ¥ã¾ã§ã«ãµã¼ãã¹ãçµäºãããã¾ããã ä»å¾ã¨ãYahoo! JAPANã®ãµã¼ãã¹ããæ顧ãã ããã¾ãããããããããé¡ããããã¾ãã
"Nested Loop Joinããåãä¸ãã¦ç¡ãã®ã«ã¿ã¤ãã«ã大ããããªãã" ã¨ææãé ããã®ã§ãã¿ã¤ãã«ãä¿®æ£ãã¾ãããMerge Joinã¨Hash Joinã®ãã¨ã¯ã¾ãä»åº¦æ¸ããã¨æãã¾ãã ãJOINã¯é ããã¨ããè¨ããã¾ããç¹ã«RDBã使ãå§ãã¦éããªãå ã«ããããè¨èª¬ã«è§¦ããçµæãJOIN=æªãã¨ããèªèã§åºå®åããã¦ãã¾ã£ã¦ãã人ãå¤ãããã«æãã¦ãã¾ãã ãããã«ãJOINãå«ããããªSELECTæã¯ãå«ã¾ãªããã®ã«æ¯ã¹ã¦éãããªãå¾åããããã¨ã¯äºå®ã§ããã¾ããæ¬è³ªçã«åãåããããå 容ãè¤éã§ã対å¦ãããã¨ãé£ãããã®ãåå¨ãã¾ããããããRDBã®ä¸ã§ä¸ä½ã©ããããã¨ãèµ·ãã¦ããã®ããç¥ããããã«åºãã¦å¯¾å¦ããã°é«éåã§ãããã¨ãå°ãªããªãã¨èãã¦ãã¾ãã æ¬ç¨¿ã§ã¯ãJOINã®å é¨åä½ã解説ããä¸ã§ãWebãµã¼ãã¹ãä½ã£ã¦ããã¨ããåºã¦ããJOIN SQLãä¾é¡ã«
åæ¸ã - ã¤ã³ããã¯ã¹ã®ä½æã¯ãªãéçºè ã®ã¿ã¹ã¯ãªã®ã ã¤ã³ããã¯ã¹ã® å é¨æ§é - ã¤ã³ããã¯ã¹ã¯ä½ã«ä¼¼ã¦ããã ã¤ã³ããã¯ã¹ ãªã¼ããã¼ã - äºéé£çµãªã¹ã æ¤ç´¢ ããªã¼(Bããªã¼) - ãã©ã³ã¹æ¨ é ãã¤ã³ããã¯ã¹ ãã¼ãI - ã¤ã³ããã¯ã¹ãé ããã2ã¤ã®åå where å¥ - æ¤ç´¢ã®ããã©ã¼ãã³ã¹ãæ¹åããããã«ã¤ã³ããã¯ã¹ãä½æ ç価 æ¼ç®å - ä¸è´ãããã¼ã®æ¤ç´¢ ãã©ã¤ããªãã¼ - ã¤ã³ããã¯ã¹ã®ä½¿ãæ¹ãç¢ºèª è¤åã¤ã³ããã¯ã¹ - è¤æ°åã«å¯¾ããã¤ã³ããã¯ã¹ é ãã¤ã³ããã¯ã¹ ãã¼ãII - åã®åé¡ç¹ãåã³ é¢æ° - whereå¥ã® ä¸ã§ã®é¢æ° 大æåã»å°æåãåºå¥ãã æ¤ç´¢ - UPPER㨠LOWER ã¦ã¼ã¶å®ç¾© é¢æ° - é¢æ°ã¤ã³ããã¯ã¹ã®å¶é ã¤ã³ããã¯ã¹ã®ä½ãéã - åé·æ§ã®æé¤æ³ ãã©ã¡ã¼ã¿å ã¯ã¨ãª - ã»ãã¥ãªãã£ã¨ããã©ã¼ãã³ã¹ã®ããã« ç¯å² æ¤
7. é常ã®Webãµã¼ãã¨ã®éä¿¡ <html> <body> <form action=âregisterâ method=âPOSTâ> æ°å:vultest<BR> ã¡ã¼ã«ã¢ãã¬ã¹:vulte[email protected]<BR> æ§å¥:ç·<BR> ï¼ä»¥ä¸ç¥ï¼ </html> POST /confirm.php HTTP/1.1 Host: example.jp ï¼ä»¥ä¸ç¥ï¼ Cookie: PHPSESSID=xxxxxxxxxx name=vultest&mail=vultest%40example.jp&gender=1 HTTP Response HTTP Request 8. è²ã ããã£ã¦ã¿ã¦ã©ãããå¿çããããç¢ºèª POST /confirm.php HTTP/1.1 Host: example.jp ï¼ä»¥ä¸ç¥ï¼ Cookie: PHPSESSID=xxxxxxxxxx name
ã¢ã³ããã¿ã¼ã³ã«ååãä»ãããã¨ã§ãã³ã³ããã¹ããå ±æã§ãã¦è°è«ããããããªãã2æ14æ¥ã15æ¥ã«é½å ã§éå¬ãããã¤ãã³ããDevelopers Summit 2013ããé称ãããµãã«ããã¦ãæ¸ç±ãSQLã¢ã³ããã¿ã¼ã³ãã®ç£è¨³ãããåç°å人æ°ã¯æ¬æ¸ã®æ義ããã強調ãã¾ããã ãSQLã¢ã³ããã¿ã¼ã³ãã¯ããã¼ã¿ãã¼ã¹ã«ãããè¨è¨ããã¢ããªã±ã¼ã·ã§ã³ã«é¢ããã¬ã¤ã¤ã¾ã§ãéçºè ãé¥ãããããã¹ã誤解ã«ååãä»ããããã§åå ã¨è§£æ±ºçã詳ãã解説ãã¦ãã¾ãã åç°æ°ãææããããã«ãããã¾ã§ãã¼ã¿ãã¼ã¹ã«é¢ãããã¼ã¿è¨è¨ãªã©ã®ãã¹ãææãããè°è«ããã«ã¯ããã®èæ¯ãå ±æããããã®é¢åãªèª¬æãå¿ è¦ã§ãããSQLã¢ã³ããã¿ã¼ã³ã®ç»å ´ã¯ãããããèæ¯ãæé»ã®ãã¡ã«å ±æããæ段ãä¸ãã¦ããããã¨ã«ãªãã¾ããæ¬æ¸ã¯ãã¼ã¿ãã¼ã¹åéã®å¤å ¸ã«ãªãè³æ ¼ãååã«åãã¦ããã®ã§ã¯ãªãã§ããããã æ¸ç±ã®ç£è¨³è èªèº«ã
æ¬æ¸ã¯DBè¨è¨ãSQLè¨è¿°ã®éã«é¿ããã¹ãäºæã1ç« ã§1ã¤ã25åç´¹ä»ããæ¸ç±ã§ãããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ãä¸å¿ã«æ®ããã·ã¹ãã éçºã«ã¯ãæ§ã ãªå ´é¢ã§é¥ãããã失æï¼ã¢ã³ããã¿ã¼ã³ï¼ãããã¾ããæ¬æ¸ã¯ãã¼ã¿ãã¼ã¹è«çè¨è¨ããã¼ã¿ãã¼ã¹ç©çè¨è¨ãã¯ã¨ãªã®è¨è¿°ãã¢ããªã±ã¼ã·ã§ã³éçºã¨ãã4ã¤ã®ã«ãã´ãªã«åããããããã®åéã«ãããã¢ã³ããã¿ã¼ã³ãç´¹ä»ãã失æãé¿ããããã®ããè¯ãæ¹æ³ãç´¹ä»ãã¾ããè¤æ°ã®å¤ãæã¤å±æ§ãå帰çãªããªã¼æ§é ã®æ ¼ç´ãããå°æ°å¤ã®ä¸¸ããNULLã®æ±ãã«èµ·å ããåé¡ãå ¨ææ¤ç´¢ãSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ãMVCã¢ã¼ããã¯ãã£ãªã©ãå®è·µçãã¤å¹ åºããããã¯ãç¶²ç¾ ãã¾ããæ¥æ¬èªçã§ã¯ãMySQLã®ã¨ãã¹ãã¼ãã¨ãã¦èåãªå¥¥éå¹¹ä¹æ°ã«ããã¢ã³ããã¿ã¼ã³ãåé²ããã¼ã¿ãã¼ã¹ã«é¢ãããã¹ã¦ã®ã¨ã³ã¸ãã¢å¿ æºã®ä¸åã§ãã æ¬æ¸ã¸ã®ç§°è³ã®å£° ç£è¨³è ã¾ããã ã¯ããã« Ié¨ ãã¼ã¿ãã¼ã¹è«
Ringã¨ã¯ããªã¯ã«ã¼ãã°ã«ã¼ãä¼ç¤¾å¾æ¥å¡ã対象ã«ããæ°è¦äºæ¥ææ¡å¶åº¦ã§ãã ãã¼ã¯ã·ã£ããR25ããã¹ã¿ãã£ãµããªããªã©æ°å¤ãã®äºæ¥ãçã¿åºãã¦ããæ°è¦äºæ¥å¶åº¦ã¯ã 1982å¹´ã«ãRINGãã¨ãã¦ã¹ã¿ã¼ããã1990å¹´ãNew RINGãã¨æ¹å®ãããã¦2018å¹´ãRingãã«ãªãã¥ã¼ã¢ã«ãã¾ããã ãªã¯ã«ã¼ãã°ã«ã¼ãã®å¾æ¥å¡ã¯èª°ã§ãèªç±ã«åå ãããã¨ãã§ãã ãã¼ãã¯ãªã¯ã«ã¼ãã®æ¢åé åã«éãããããã¨ããããé åã対象ã§ãã ãªã¯ã«ã¼ãã«ã¨ã£ã¦ãRingã¨ã¯ãæ°ãã価å¤ã®åµé ãã¨ããã°ã«ã¼ãçµå¶ç念ãä½ç¾ããå ´ã§ããã å¾æ¥å¡ãèªåã®ææã§æ°è¦äºæ¥ãææ¡ã»å®ç¾ã§ããæ©ä¼ã§ãã Ringããã¼ ãã®å¾ã®äºæ¥éçºææ³ Ringãééããæ¡ä»¶ã¯ãäºæ¥åãæ¤è¨ãã権å©ãå¾ã¦ãäºæ¥éçºãè¡ãã¾ãã ãã¾ãã¾ãªäºæ¥éçºã®ææ³ãããã¾ãããä¾ãã°æ¢åé åã§ã®äºæ¥éçºã®å ´åã¯ã æ å½äºæ¥ä¼ç¤¾å ã§äºç®ã
Ringã¨ã¯ããªã¯ã«ã¼ãã°ã«ã¼ãä¼ç¤¾å¾æ¥å¡ã対象ã«ããæ°è¦äºæ¥ææ¡å¶åº¦ã§ãã ãã¼ã¯ã·ã£ããR25ããã¹ã¿ãã£ãµããªããªã©æ°å¤ãã®äºæ¥ãçã¿åºãã¦ããæ°è¦äºæ¥å¶åº¦ã¯ã 1982å¹´ã«ãRINGãã¨ãã¦ã¹ã¿ã¼ããã1990å¹´ãNew RINGãã¨æ¹å®ãããã¦2018å¹´ãRingãã«ãªãã¥ã¼ã¢ã«ãã¾ããã ãªã¯ã«ã¼ãã°ã«ã¼ãã®å¾æ¥å¡ã¯èª°ã§ãèªç±ã«åå ãããã¨ãã§ãã ãã¼ãã¯ãªã¯ã«ã¼ãã®æ¢åé åã«éãããããã¨ããããé åã対象ã§ãã ãªã¯ã«ã¼ãã«ã¨ã£ã¦ãRingã¨ã¯ãæ°ãã価å¤ã®åµé ãã¨ããã°ã«ã¼ãçµå¶ç念ãä½ç¾ããå ´ã§ããã å¾æ¥å¡ãèªåã®ææã§æ°è¦äºæ¥ãææ¡ã»å®ç¾ã§ããæ©ä¼ã§ãã Ringããã¼ ãã®å¾ã®äºæ¥éçºææ³ Ringãééããæ¡ä»¶ã¯ãäºæ¥åãæ¤è¨ãã権å©ãå¾ã¦ãäºæ¥éçºãè¡ãã¾ãã ãã¾ãã¾ãªäºæ¥éçºã®ææ³ãããã¾ãããä¾ãã°æ¢åé åã§ã®äºæ¥éçºã®å ´åã¯ã æ å½äºæ¥ä¼ç¤¾å ã§äºç®ã
Ringã¨ã¯ããªã¯ã«ã¼ãã°ã«ã¼ãä¼ç¤¾å¾æ¥å¡ã対象ã«ããæ°è¦äºæ¥ææ¡å¶åº¦ã§ãã ãã¼ã¯ã·ã£ããR25ããã¹ã¿ãã£ãµããªããªã©æ°å¤ãã®äºæ¥ãçã¿åºãã¦ããæ°è¦äºæ¥å¶åº¦ã¯ã 1982å¹´ã«ãRINGãã¨ãã¦ã¹ã¿ã¼ããã1990å¹´ãNew RINGãã¨æ¹å®ãããã¦2018å¹´ãRingãã«ãªãã¥ã¼ã¢ã«ãã¾ããã ãªã¯ã«ã¼ãã°ã«ã¼ãã®å¾æ¥å¡ã¯èª°ã§ãèªç±ã«åå ãããã¨ãã§ãã ãã¼ãã¯ãªã¯ã«ã¼ãã®æ¢åé åã«éãããããã¨ããããé åã対象ã§ãã ãªã¯ã«ã¼ãã«ã¨ã£ã¦ãRingã¨ã¯ãæ°ãã価å¤ã®åµé ãã¨ããã°ã«ã¼ãçµå¶ç念ãä½ç¾ããå ´ã§ããã å¾æ¥å¡ãèªåã®ææã§æ°è¦äºæ¥ãææ¡ã»å®ç¾ã§ããæ©ä¼ã§ãã Ringããã¼ ãã®å¾ã®äºæ¥éçºææ³ Ringãééããæ¡ä»¶ã¯ãäºæ¥åãæ¤è¨ãã権å©ãå¾ã¦ãäºæ¥éçºãè¡ãã¾ãã ãã¾ãã¾ãªäºæ¥éçºã®ææ³ãããã¾ãããä¾ãã°æ¢åé åã§ã®äºæ¥éçºã®å ´åã¯ã æ å½äºæ¥ä¼ç¤¾å ã§äºç®ã
ãã¼ãã«ã®JOINãè¦æã§ãããããã®ä¾ãæãã¤ãã¦ããã¯ããã£ãããã£ããç解ã§ããããã«ãªãã¾ããããããé ããé¢ãã¾ããâ¦â¦ã â» INNERãOUTERã¯é£¾ããçç¥ã§ããã INNER JOIN â JOIN LEFT OUTER JOIN â LEFT JOIN RIGHT OUTER JOIN â RIGHT JOIN â» ON ...=... ãã¾ã¨ã㦠USING(å±æ§) ã¨æ¸ããã â» ä½ã§çµåãããè¨ãã¾ã§ããªãæã¯ãNATURALãæå®ããã¨åæã«JOINãã¦ããããNATURALã«JOINãã¦â¦â¦ã â» WHEREã¯çµåããçµæã«ä½ç¨ããã â» ç¾å®ã«ã¯ä¸å³ã®ããã«1対1ã§çµåãã¾ããã â» ãã¾ããCROSS JOINã ãããªã®ä½¿ãã¾ããã ãã¯ãç¨ç»åã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}