- Derby has a small footprint -- about 2.6 megabytes for the base engine and embedded JDBC driver.
- Derby is based on the Java, JDBC, and SQL standards.
- Derby provides an embedded JDBC driver that lets you embed Derby in any Java-based solution.
- Derby also supports the more familiar client/server mode with the Derby Network Client JDBC driver and Derby Network Server.
- Derby is easy to install, deploy, and use.
I used it while I was working with OpenJPA about which I will write a tutorial later.
1-Anyway, please download Derby from:
http://db.apache.org/derby/derby_downloads.html
2- In windows;
set DERBY_INSTALL=C:\Apache\db-derby-10.10.2.0-bin
3-In windows;
set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;.
4-In windows;
C:\> cd %DERBY_INSTALL%\bin
C:\Apache\db-derby-10.10.2.0-bin\bin> setEmbeddedCP.bat
5- If you put the jars in your classpath; then you can run this comment from anywhere in your computer:
> java org.apache.derby.tools.ij
After this command you can create new databases, run sql files and sql statements etc...
for example:
connect 'jdbc:derby:/home/bill/databases/MyDbTest';
disconnect;
!!! If you do not disconnect from the table, the java project running from Eclipse cannot connect to the Database and it throws exceptions.
Hiç yorum yok:
Yorum Gönder