This document describes how to quickly establish a connection to Sun's Java DB (the database is based on the Apache Derby database) in the NetBeans IDE. Once connected, you can easily use the database in the IDE to create tables, populate tables with data, run SQL queries, and so on.
The Java DB database is a distribution version of Sun-supported Apache Derby. Java DB is a fully transactional, secure, standards-based database server that is written in Java and fully supports the SQL, JDBC API, and Java EE Technologies. The Java DB database is bundled with the Sun Java System application Server 9.0, Platform Edition,
Expected Duration: - minutes
The following topics are covered in this tutorial:
L Get Software
L Configuration Database
L REGISTER the database in the NetBeans IDE
L START the server and create the database
L Connect to a database
L Create a table
L Add Table Data
L Use SQL Scripts
L recreate the table from another database
L Next
Get software
Before starting this tutorial, you must make sure that the following software is installed on your computer:
1. NetBeans IDE 5.5 (download)
2. Java SE Development Kit (jdk™) version 5.0 or later (download)
3. Java DB (download)
Note: If you are downloading JDK 6, the installation will include the Java DB database. You can also download the Sun Java System application Server, which contains Java DB. When you register the application server in the NetBeans IDE, Java DB is automatically registered. In addition, you can download the Java EE 5 Tools Bundle, which includes both the NetBeans IDE and the Sun Java System Application Server.
Configuration Database
If the Sun Java System Application Server is registered in the NetBeans IDE, then Java DB will be automatically registered. You can jump directly to the start server and create a database section. If you downloaded the application server, but you need help registering the server in the NetBeans IDE, search IDE Help (F1) to find an instance of registering the Sun Java System Application Server. If you downloaded only Java DB, do the following:
1. Run this self-extracting file. Create a folder named "Javadb" in the same location as the file. If you downloaded only Java DB and wanted to place the database server in a different location from where it was extracted, you should reposition it immediately.
2. In the Java DB root (javadb), create a name named "Database