ãã¼ã¿ãã¼ã¹ãã³ãã¼ãæä¾ããJDBCãã©ã¤ãã¯ãAndroidã§ã¯åä½ãããã©ããã¯åãããªã
ãã¾ãããããªãæ¬é£è¼ã®ç®çã¨çµè«ããæ¸ãã¾ãã
ããAndroidã¢ããªã±ã¼ã·ã§ã³ã®éçºè¨èªã¯Javaãªã®ã ãããJDBCãã©ã¤ãã使ã£ã¦ãã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ããã°Android端æ«ãã¯ã©ã¤ã¢ã³ãã¨ãã¦ãã¼ã¿ãã¼ã¹ãµã¼ãã¼ã«ã¢ã¯ã»ã¹ã§ããã¯ãã ãã¨æ³åãã¦ããéçºè ãå¤ãããããã¾ããã
ããããã話ã¯ããã»ã©åç´ã§ã¯ããã¾ãããåãã¼ã¿ãã¼ã¹ãã³ãã¼ã®æä¾ããJDBCãã©ã¤ãã®å¤ãã¯ãç¾ç¶ã§ã¯Androidä¸ã®Javaã§åä½ããªãã£ããããããã¯åä½ããããã«è¦ããå ´åã§ããã©ã®ãããªå¶éãé害ãçºçãããã¯äºæ¸¬ã§ãã¾ããã
ãAndroidä¸ã§åä½ããJavaããã°ã©ã ã¯ãOracleãæä¾ããæ£è¦ã®JREã§åä½ããã®ã§ã¯ãªããGoogleãæä¾ããDalvikï¼ãã«ããã¯ï¼ä»®æ³ãã·ã³ã¨å¼ã°ããJavaäºæç°å¢ã§åä½ãã¾ããããã¦JDBCãã©ã¤ããJREãå©ç¨ããJavaããã°ã©ã ã®ä¸ç¨®ã§ãããã¨ã«ã¯å¤ããããªãããã§ãã
ãç¾å¨ãªãªã¼ã¹ããã¦ããJDBCãã©ã¤ãã®ã»ã¨ãã©ãã¹ã¦ã¯ãOracleã®æä¾ããJavaç°å¢ã§åä½ããããã«æ¸ããã¦ãããDelvikç°å¢ã§ã®åä½ã¯èæ ®ããã¦ãã¾ãããããã¦å®éãåä½ããªããã©ã¤ããæ°å¤ãåå¨ãã¾ãããã®ãããAndroidã§ãã¼ã¿ãã¼ã¹ã¯ã©ã¤ã¢ã³ããä½ãã®ã«JDBCã使ãã°ããã¨ã¯ç°¡åã«ã¯ãããªãç¶æ³ã§ãã
JDBC Driver over HTTP for Android
ããã®ãããªç¶æ³ä¸ã§ç§ãã¡ã¯ãAndroidã使ã£ãã¯ã©ã¤ã¢ã³ããµã¼ãã¼ã·ã¹ãã ãããã«æ§ç¯ã§ããããã«ãJDBC Driver over HTTP for Androidããéçºãã¾ããï¼å³1ï¼ãæ¬é£è¼ã®æ¬¡åã§ç´¹ä»ãããã®JDBCãã©ã¤ãã¯ãWebãµã¼ãã¼ãçµç±ãã¦Androidã¯ã©ã¤ã¢ã³ããããã¼ã¿ãã¼ã¹ãµã¼ãã¼ã«ã¢ã¯ã»ã¹ãããRESTã使ã£ããã¼ã¿ãã¼ã¹æ¥ç¶ã®ããã®ããã«ã¦ã§ã¢ã§ããWebãµã¼ãã¼ãããã¼ã¿ãã¼ã¹ãµã¼ãã¼ã¸ã®ã¢ã¯ã»ã¹ã¯ããã¼ã¿ãã¼ã¹ãã³ãã¼ãæä¾ããJDBCãã©ã¤ããå©ç¨ãã¾ãã
ãæ¬è¨äºç¨ã«éçºããããã®JDBC Driver over HTTP for Androidã¯ãå®å ¨ãªæ©è½ãæã£ãJDBCãã©ã¤ãã§ã¯ããã¾ãããããã¼ã¿ãã¼ã¹ãµã¼ãã¼ã¸ã®ã¢ã¯ã»ã¹æ©è½ãæã¡ãã½ã¼ã¹ã³ã¼ããã¨ç¡åã§æä¾ããã¾ããããã¦JDBCã¨ä¸ä½äºæã®APIãæã¡ã¾ãã
ãã¤ã¾ããå½é¢ããã®ãã©ã¤ãç¨ã«Androidãã¼ã¿ãã¼ã¹ã¢ããªã±ã¼ã·ã§ã³ãéçºãã¦ããããã³ãã¼ããæ£å¼ã«Androidã«å¯¾å¿ããJDBCãã©ã¤ãããªãªã¼ã¹ãããããããã«åãæ¿ããã¨ãããã©ã³ãå¯è½ã§ãããã®ãã©ã¤ãç¨ã«éçºããããã°ã©ã ããç¡ä¿®æ£ã§ãä»å¾æä¾ãããã¨æãããAndroidç¨ã®JDBCãã©ã¤ãã«åãæ¿ããããã¨ã¾ã§ã¯è¨ãã¾ããããã¡ã½ããã¯å ±éãªã®ã§ã大ããªæéã¯ããããªãã¯ãã§ãã
ãã¾ããä¾ãã°3Gåç·ã使ã£ã¦Androidã¹ãã¼ããã©ã³ããã¢ã¯ã»ã¹ãããããªå ´åãWebãµã¼ãã¼ã¯å ¬éãã¦ãããã¼ã¿ãã¼ã¹ãµã¼ãã¼ã¯å ¬éããããªãã¨ããä¼æ¥ãå¤ãã§ãããããã®ãããªå ´åã«ãããã®JDBC Driver over HTTP for Androidã¯æå¹ã ã¨æãã¾ãã
ããã ããããã¾ã§ä¸ä½äºæãªã®ã§ãä»ã®JDBCãã©ã¤ãç¨ã«ä½ã£ãã¢ããªã±ã¼ã·ã§ã³ãããã®ãã©ã¤ãã§åããã¨ã¯æå¾ ããªãããã«ãã¦ãã ããã
ããã®ãããã¢ããªã±ã¼ã·ã§ã³éçºã«ã¯ããã®ãã©ã¤ãã®å®è£ ã¬ãã«ãèæ ®ããããã°ã©ãã³ã°ãå¿ è¦ã§ããã¤ã¾ããã©ã®ã¡ã½ãããå®è£ ããã¦ããã®ããææ¡ãã¦éçºããå¿ è¦ãããã®ã§ãããã«ã¤ãã¦ãã以éããã®é£è¼ã§èª¬æãã¾ãã
DBGrid for Android
ãAndroid端æ«ãã¯ã©ã¤ã¢ã³ãã¨ãã¦ãã¼ã¿ãã¼ã¹ã¢ããªã±ã¼ã·ã§ã³ãä½ãå ´åã®ããä¸ã¤ã®åé¡ç¹ã¯ããã¼ã¿é£çµå¯è½ãªã°ãªããã³ã³ãã¼ãã³ãããªããã¨ã§ããããããªãã¨1è¡ãç·¨éããã¢ããªã±ã¼ã·ã§ã³ã¯ç°¡åã«ä½ãã¾ãããè¤æ°è¡ãä¸è¦§ã§è¦ãªããç·¨éãããããªã¢ããªã±ã¼ã·ã§ã³ãä½ããã¨ã¯å°é£ã§ãã
ããã®åé¡ã解決ããããã«ãç§ãã¡ã¯æ¬é£è¼ç¨ã«DBGrid for Andoroidãéçºãã¾ãããããã次å·ã§ç´¹ä»ããã½ã¼ã¹ã³ã¼ããæä¾ãã¾ãããã ãããã¯ã³ã³ãã¼ãã³ãã¨ãã¦å®è£ ãã¦ããªãã®ã§ãå種ã®ãã¼ã¿ãã¼ã¹ã¢ããªã±ã¼ã·ã§ã³ã«é©ç¨ããããã«ã¯ãã½ã¼ã¹ã³ã¼ããæ¹å¤ããå¿ è¦ãããã¾ãããã®ãããæ¬é£è¼ã§ããã°ã©ã ã®å®è£ å 容ã®èª¬æãããã³ç®çå¥ã®ã½ã¼ã¹ã³ã¼ãã®æ¹å¤ã®ä¾ãç´¹ä»ããäºå®ã§ãã
æå¹ã«å©ç¨ããã«ã¯ã½ã¼ã¹ã³ã¼ãã®ç解ãå¿ è¦
ããããã®ããã°ã©ã ã¯è¨äºã®ãµã³ãã«ããã°ã©ã ã¨ããæ§è³ªä¸ãã¨ã©ã¼ãã³ãã©ã¼ã¯ã»ã¨ãã©è¨è¿°ããã¦ãã¾ããããã®ãããå®éã«ä½¿ç¨ããããã«ã¯ã½ã¼ã¹ã³ã¼ãã®ç解ãå¿ é ã¨ãªãã¾ãã
ãç¹ã«ãã¼ã¿ã°ãªããã¯ããã°ã©ã ãä½ãããã«ã½ã¼ã¹ã³ã¼ãã®æ¹å¤ãå¿ è¦ã«ãªãã¾ãããã®ãããæ¬è¨äºã¯ãã¨ã¦ãåå¿è åãã®å 容ã¨ã¯ããã¾ãããããããããç¨åº¦ä»¥ä¸ã®ä¸ç´è ã§ãAndroid端æ«ãã¤ãã£ãã¯ã©ã¤ã¢ã³ã/ãµã¼ãã¼ãã¼ã¿ãã¼ã¹ã¢ããªã±ã¼ã·ã§ã³ã®éçºãããã«ã§ãå§ãããã¨ãã人ã«ã¯ãæçãªãã®ã ã¨ç¢ºä¿¡ãã¦ãã¾ãã
ã©ã¤ã»ã³ã¹ã«ã¤ãã¦
ããããã®ããã°ã©ã ã®ã©ã¤ã»ã³ã¹ã«ã触ãã¦ãããªãã¨ãããªãã§ããããããããç§ãã¡ãéçºããããã°ã©ã ãå©ç¨ããéçºè ã¯ãããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããèªç±ã«æ¹å¤ããã³ã³ãã¤ã«ãããã®ãã¨ã³ãã¦ã¼ã¶ã¼åãã«èªç±ã«é å¸ãããã¨ãã§ãã¾ãããã ããéçºè åãã®ãããã¯ããåé å¸ãããã¨ã¯ã§ãã¾ããããã®æ¡ä»¶ã¯ãæåã®ã³ã³ãã¼ãã³ããè³¼å ¥ããã¦ã¼ã¶ã¼ã®æ¨©å©ã¨åçã¨èãã¦ãããã°ããã§ãã
ããããæ¬é£è¼ã®ç®çã¨çµè«ã§ããããã¾ã§èªãã°ãæ¬é£è¼ããã以éãèªãã¹ããèªã¾ãªãã¦ãããã®ãå¤æã§ããã®ã§ã¯ãªãã§ããããã
ã次ã®ãã¼ã¸ã§ã¯è©±ãæ»ãã¦ãç¾å¨ãªãªã¼ã¹ããã¦ããåãã³ãã¼è£½ã®JDBCãã©ã¤ãã®åé¡ç¹ã«ã¤ãã¦èª¬æãã¾ãã