더비 데이터베이스

Derby        Java        ,  Apache       。
    Java   ,            ;          ,   ,
      jar       。Derby                ,   
      、       、 /   、  、  /    、   、         。

1.       DERBY_INSTALL=%JAVA_HOME%\db //set DERBY_INSTALL=%JAVA_HOME%\db
2. %DERBY_INSTALL%\lib\    Jar    CLASSPATH
 
3.       java org.apache.derby.tools.sysinfo,             
4.ij Derby                 ,           
         
  java org.apache.derby.tools.ij 
               
           
  conect 'jdbc:derby:<     >[;create=true/false]';
  eg: connect 'jdbc:derby:D:/myDB;create=true';//    D:\myDB    
    SQL  
  run '<    >'
  disconnect;     
  Exit;   ij
5.Derby    
  //  JDBC  
  Class.forname(org.apache.derby.jdbc.EmbeddedDriver);
  //     
  Connnection con = DriverManager.getConnection("jdbc:derby:D:\myDB;create=true");
  //    
  DriverManager.getConnection("jdbc:derby:D:\myDB;shutdown=true");
  //             

6.      Derby    
     : java org.apache.derby.drda.NetworkServerControl start [-h<host>[-p<port>]]
              loclhost:9999    
  eg: java org.apache.derby.drda.NetworkServerControl start -h localhost -p 9999
  connect 'jdbc:derby://localhost:9999//D:/myDB';

좋은 웹페이지 즐겨찾기