ʵÏÖJavaÁ¬½Ómysql£¨Ô´Â룩£¡
JavaÁ¬½ÓmysqlÊý¾Ý¿â£¬´úÂë¾¹ýÔËÐÐ׼ȷÎÞÎó¡£
ÏÂÃæΪʵÀý---->
ÓÃÊý¾Ý¿â²Ù×ݹ¤¾ß£¨Àý£ºSQLyogEnt£©²Ù×Ýmysql½¨±í£¬»òdosϽ¨£¬ÈçÏ£º
Êý¾Ý¿âÃû£ºscutcs
±íÃû£ºstudent
±íÄÚÈÝ£º
sno char[7] NO NULL Primary Key;
sname varchar[8] NO NULL;
sex char[2] NO NULL;
bdate date NO NULL;
height decimal[10,0] ;
-------------------------------------------------------------------------
java³ÌÐò£º
import java.sql.*;
public class JDBCTest {
public static void main(String[] args){
String driver = "com.mysql.jdbc.Driver"; // Çý¶¯³ÌÐòÃû
String url = "jdbc:mysql://localhost/scutcs"; // URLÖ¸ÏòÒª·ÃÎʵÄÊý¾Ý¿âÃûscutcs
String user = "........"; // MySQLÅäÖÃʱµÄÓû§Ãû
String password = "........"; // MySQLÅäÖÃʱµÄÃÜÂë
try {
Class.forName(driver); // ¼ÓÔØÇý¶¯³ÌÐò
Connection conn = DriverManager.getConnection(url, user, password); // Á¬ÐøÊý¾Ý¿â
if(!conn.isClosed())
System.out.println("Succeeded connecting to the Database!"); //ÑéÖ¤ÊÇ·ñÁ¬½Ó³É¹¦
Statement statement = conn.createStatement(); &
Ïà¹ØÎĵµ£º
MysqlÖÐÎÄÂÒÂëÎÊÌâ
֮ǰ±»mysqlÖÐ×ÜÊdzöÏÖÖÐÎÄÂÒÂë¸ãµÃÔÆÀïÎíÀÔÚÍøÉÏÒ²ËÑÁËЩÏà¹Ø×ÊÁÏ£¬¿É½á¹û¸üÈÃÎÒ¾õµÃ×Ö·û¼¯µÄת»»ÊÇÏ൱¸´ÔÓ£¬ÉõÖÁÓÐÁ˵ִ¥ÐÄÀí£¬²»¹ý»¹ºÃÔÚ×îºóËѵ½¼¸Æª¾µäµÄÎÄÕ£¬¾¹ýÑжÁ×ÜËãÃ÷°×¹ýÀ´£¡ºÃÎÄÕ£¬²»¸Ò¶ÀÏí£¬ÏÖ½«ÎÄÕÂÉÔ×÷ÕûÀíÓë´ó¼Ò·ÖÏí¡£
×Ö·û¼¯»ù±¾¸ÅÄ
http://home.phpchina.com/space.php ......
http://incubator.apache.org/cassandra/
http://zh.wikipedia.org/wiki/Cassandra
Apache CassandraÊÇÒ»Ì׿ªÔ´·Ö²¼Ê½Êý¾Ý¿â¹ÜÀíϵͳ¡£Ëü×î³õÓÉFacebook¿ª·¢£¬ÓÃÓÚ´¢´æÌرð´óµÄÊý¾Ý¡£
Ö÷ÒªÌØÐÔ£º
·Ö²¼Ê½
»ùÓÚcolumnµÄ½á¹¹»¯
¸ßÉìÕ¹ÐÔ
CassandraµÄÖ÷ÒªÌصã¾ÍÊÇËü²»ÊÇÒ»¸öÊý¾Ý¿â£¬¶øÊÇÓÉÒ»¶ÑÊý¾Ý¿â½Úµã¹²Í¬¹¹³ÉµÄÒ» ......
URLµÄopenConnection()·½·¨½«·µ»ØÒ»¸öURLConnection¶ÔÏ󣬸öÔÏó±íʾӦÓóÌÐòºÍ URL Ö®¼äµÄͨÐÅÁ´½Ó¡£³ÌÐò¿ÉÒÔͨ¹ýURLConnectionʵÀýÏò¸ÃURL·¢ËÍÇëÇ󡢶ÁÈ¡URLÒýÓõÄ×ÊÔ´¡£
ͨ³£´´½¨Ò»¸öºÍ URL µÄÁ¬½Ó£¬²¢·¢ËÍÇëÇ󡢶ÁÈ¡´Ë URL ÒýÓõÄ×ÊÔ´ÐèÒªÈçϼ¸¸ö²½Ö裺
£¨1£©Í¨¹ýµ÷ÓÃURL¶ÔÏóopenConnection()·½·¨À´´´½¨URLConnectio ......
1.
Ôö¼ÓJavaÓ¦ÓÃ
ÔÚandroid_2.1/packages/appsÔö¼Ó¸ÃÏîÄ¿£»
ÔÚbuild/target/product/generic.mkµÄPRODUCT_PACKAGESºóÃæÔö¼Ó¶ÔÓ¦°üµÄÃû×Ö¡£
1.1
´ÓÃüÁîÐ ......