Вы находитесь на странице: 1из 4

This chapter provides an introduction to the various tools that JDeveloper uses

to help you work with and manage databases.


This chapter includes the following sections:
Section 25.1, "Using the Database Navigator"
Section 25.2, "Using the Structure Window"
Section 25.3, "Using the Database Reports Navigator"
Section 25.4, "Using the Find Database Object Window"
Section 25.5, "Using the SQL Worksheet"
Section 25.6, "Using the SQL History Window"
Section 25.7, "Using the Snippets Window"
Section 25.8, "Using the Database Object Viewer"
Section 25.9, "Using SQL*Plus"
Section 25.10, "DBMS Output Window"
Section 25.11, "OWA Output Window"
25.1 Using the Database Navigator
The Database Navigator provides you with a complete editing environment for onli
ne databases. You can create, update and delete database objects using the navig
ator.
The Database Navigator is integrated with:
The SQL Worksheet.
The Database Object Viewer.
In addition, you can drag database objects from a database connection onto a dat
abase diagram to either:
Model the database objects on the diagram.
Copy the database objects to a project, and model the offline database objec
ts on the diagram.
For more information about database modeling, see Section 23.5, "Database Diagra
m."
When you first open the Database Navigator, it appears in the docked position, a
long with any other open navigators. Its default docked position is in the upper
left-hand corner, flush with the main work area of JDeveloper. When more than o
ne navigator is open, each appears with a tab displaying its name.
Right-click on a node within the Database Navigator to bring up a context-sensit
ive menu of commands. The menu commands available depend on the node selected. Y
ou can open nodes in their default editors, as well as other editors common to t
hat node type, using the context menu.
Table 25-1 Database Navigator Toolbar Icons
Icon Name Function
New connection
New Connection
Click to open the Create Database Connection wizard, where you enter the details
to create a connection to a database.
Refresh
Refresh
Click to synchronize the display in the navigator with the contents of the conne
ction.
Filter
Apply Filter
Click to filter which objects will be displayed for a given connection. To enabl
e the icon, select a node within the connection in the navigator and wait for th
e connection to be established.
You can perform various tasks from the context menus in the Database Navigator.
Right-click the IDE Connections node (for globally defined connections) or an ap
plication name node (for connections that are locally-scoped, and just available
within the application) and select the appropriate menu item to:
Open the New Gallery.
Create a new database connection.
Import an XML file with connection definitions.
Export current connections.
You can perform the following operations from a database connection node:
Connect to and disconnect from the database.
Open the New Gallery.
Delete the database connection.
Generate SQL from database objects.
Copy database objects as offline database objects to a project.
Run SQL*Plus.
Filter the objects displayed in the connection.
Edit the database connection properties.
Open the SQL Worksheet.
Generate DB doc
Remote Debug
Gather Schema Statistics
XML DB Protocol server configuration
Perform remote debugging if you are using the Java Platform Debugger Archite
cture (JPDA) using a debugger to listen so that a debuggee can attach to the deb
ugger.
There are additional options available from database object type nodes (for exam
ple, Tables, Indexes, or Procedures) or from database object nodes (such as a sp
ecific table, or a specific view). The options available depend on the node sele
cted.
25.2 Using the Structure Window
The database view of the Structure Window displays details of a database object
selected in the Database Navigator, or an offline database object selected in th
e Application Navigator.
When you select a database object such as a table in a database connection in th
e Database Navigator or an offline database object such as a table in an offline
database in the Application Navigator, a node for that object is shown in the S
tructure Window. You can expand the node to see details of the sub objects that
make up the database object. In the case of a table, these include sub objects s
uch as columns, constraints, and indexes.
Table 25-2 Icons in the SQL Worksheet Toolbar
Icon Name Function
refresh button
Refresh
Click to refresh the content of the Structure Window. You may want to do this wh
en a database object has been changed outside JDeveloper, for example using SQL*
Plus, and you want to be sure that the Structure Window reflects the current sta
te of the object.
You can perform the following operations from the database view of the Structure
Window:
View properties or edit properties (offline database objects only) by choosi
ng Properties from the context menu of an appropriate node. The Edit dialog for
the object type opens. It is read only for database objects.
Use a database object or offline database object such as a table as a templa
te to create a new object by choosing Use as Template from the context menu. The
Create dialog for the object type opens.
Find usages of an offline database object such as a table by choosing Find U
sages from the context menu.
25.3 Using the Database Reports Navigator
Use the Database Reports Navigator to view reports about the database and its ob
jects.
You can also create your own user defined reports.
To open a pre-defined report, expand Data Dictionary Reports and navigate to the
report you want. Double-click the report name to run it. A number of dialogs ma
y be displayed before the report is opened in the Reports Results window:
Select Connection dialog (all reports), where you ca

Вам также может понравиться