Connecting to Oracle Database from NetBeans IDE 7.0
หน้าแรก Netbeans Connecting to Oracle Database from NetBeans IDE 7.0
NetBeans IDE 7.0 introduces a built-in support for Oracle Database so that you can easily establish a connection from inside the IDE and begin working with the database. In this tutorial, we use a local installation of Oracle Database 10g Express Edition (Oracle Database XE), a lightweight database that is free to develop, deploy, and distribute.
This document shows how to set up a connection to a local installation of Oracle Database XE from the NetBeans IDE, use the IDE's built-in SQL editor to handle the database data, and how to enable the OCI 8 PHP extension to write PHP code that connects to an Oracle database.
Contents
- Before You Begin
- Establishing a Connection to Oracle Database
- Manipulating Data in Oracle Database from the IDE
- Tips for Working in the NetBeans IDE SQL Editor
- OCI 8 and the NetBeans IDE for PHP
- Using OCI JDBC Driver with the NetBeans IDE
- Troubleshooting
- See Also
To follow this tutorial, you need the following software and resources.
| Software or Resource | Version Required |
|---|---|
| NetBeans IDE | 7.0 Java EE |
| Java Development Kit (JDK) | Version 6 or 7 |
| Oracle Database XE | 10 g Express Edition |
| Oracle JDBC driver | ojdbc6.jar |
Before You Begin
Before you start walking through this tutorial, consider the following:
- This tutorial demonstrates how to connect to an Oracle Database XE instance installed on your local system, but the steps can also be applied when you are connecting to a remote instance. If you are connecting to a local instance you need to download and install Oracle Database XE. The installation process is simple and intuitive, but if you have questions, refer to the Oracle Database XE installation guide for your platform.
- There are two categories of Oracle JDBC drivers: OCI and JDBC Thin.
- Oracle's JDBC Thin driver is based on Java and is platform independent. This standalone driver does not require the presence of other Oracle libraries and allows a direct connection to an Oracle Database. This tutorial uses this driver to show how to connect to Oracle Database. Before walking through the tutorial, you need to download the ojdbc6.jar file and save it on your system.
- Oracle's OCI driver uses Oracle's native client libraries
to communicate with databases. These libraries are obtained as part of
the Oracle Instant Client. Although the Thin driver is sufficient in
most cases, you might also want to use the OCI driver by following the
steps in Using OCI JDBC Driver with the NetBeans IDE.
A good example of the OCI driver use is accessing a remote Oracle database from a PHP application using the Oracle Instant Client libraries. See the OCI 8 and the NetBeans IDE for PHP section in this tutorial for information on how to enable the OCI8 extension for PHP.
http://netbeans.org/kb/docs/ide/oracle-db.html
http://www.youtube.com/watch?v=pe1FYuom0CE
ขึ้นไปด้านบน
