Apache Derby Database Implementation Documentation - rsanchez-wsu/RaiderPlanner GitHub Wiki

Setting up Derby

In order to use Derby, you first have to download the appropriate software for Eclipse.

  1. Help -> Install New Software
  2. Select All Available Sites under work with and install "Data Tools Platform Enablement for Apache Derby".
  3. Open the database perspective that you will be using to access the database, go to Window -> Perspective -> Open Perspective -> Other and select the "Database Development" option.
  4. Right-click the "Database Connections" folder and select "New..." or click on the "New Database Profile" button in the toolbar of the "Data Source Explorer"
  5. Choose "Derby" and click Next

  1. Click the "New Driver Definition" button near the top of the dialog box
  2. Choose "Derby Embedded JDBC Driver" version 10.2 from the list
  3. Click the "JAR List" tab
  4. Click the "Add JAR/Zip ..." button
  5. Browse to the location where Gradle downloaded/cached the Derby JAR Typically in .gradle/caches/modules-2/files-2.1/org.apache.derby/derby/10.14.1.0/3bcd8b1af3f8cd022d54d331e00064776be04f9c/derby-10.14.1.0.jar
  6. Select the generic derby.jar from the driver list and click "Remove JAR/Zip"
  7. Click OK.
  8. Select a location for your database outside of your working directory and click Finish.

It would also be a good idea to test your ping to ensure the connection is successful.

Connecting to your database

  1. Right-click on your database connection and select Connect
  2. The default properties should be sufficient. Click Apply and Close
  3. Right-click MyDB and select Generate DDL...
  4. Click Next, leaving the checkboxes unchanged.
  5. Click Next again.
  6. Select the destination folder you wish to save and name the SQL script.
  7. Check the Open DDL file for editing box.
  8. Click Next.
  9. Click Finish.

  1. The DDL file will open and you will be able to add your SQL scripts.