Wednesday, March 13, 2013

Using Apache Derby in Eclipse

  1. Installations You may skip this part if you are using Eclipse 3.7 (Indigo) or above, as they are pre-installed.
    1. Eclipse DTP (Data Tools Platform)
      Figure 1: Install Data Tools Platform
      Install the Data Tools Platform via the Eclipse update manager. Install "Data Tools Platform Enablement Extender SDK".
    2. Apache Derby Download the latest Derby version from the Apache website http://db.apache.org/derby/. Choose the binary distribution.
  2. Configurations
    1. Establish a connection to an embedded Derby. Define the driver for the Derby access.
      Go to Window-> Preferences and select "Data Management" -> Connectivity -> Driver Definition. Press Add. Select Derby and the version you want to use. If your Derby version is not listed selected the highest number displayed.
      Figure 2: New Driver Definition
  3. Implementation
    1. Create a Data Development Project.
      1. Invoke the "New Project" wizard from the menu "File -> "New" -> "Project...".  In the "New Project" wizard, select "Data Development Project".
        Figure 3: Create a Data Development Project
      2. In the "New Data Development Project" wizard, input a Project Name.  Click the "Next" button.
        Figure 4: Data Development Project wizard - Project Name
      3. Click the "New" button to create a new connection.
        Figure 5: Select Connection
      4. In the "New Connection" wizard, select "Embedded Derby JDBC Driver" as the JDBC driver.  Click the "Next" button.
        Figure 6: Connection Parameters
      5. Click the "Next" button.
        Figure 7
      6. A new database connection is created.
        Figure 8: New database connection created
      7. In the "Default Application Process Setting" dialog, check the option "Omit default schema in generated statements".
        Figure 9: Default Application Process Settings

      8. Figure 10: Database Development Project

      9. Note that a Database Development Project is created.

No comments:

Post a Comment