Database application development is a feature of JBuilder Professional and Enterprise. Distributed application development is a feature of JBuilder Enterprise.
This chapter provides information on how to accomplish some common database administrator tasks. The following subjects are covered:
The JDBC Explorer is a hierarchical database browser that also allows you to edit data. It presents JDBC-based meta-database information in a two-paned window. The left pane contains a tree that hierarchically displays a set of databases and its associated tables, views, stored procedures, and metadata. The right pane is a multi-page display of descriptive information for each node of the tree. In certain cases, you can edit data in the right pane as well.
To display the JDBC Explorer, select Tools|JDBC Explorer from the JBuilder menu.
Through a persistent connection to a database, the JDBC Explorer enables you to:
Create, view, and edit data in existing tables.
Enter and execute SQL statements to query a database.
The JDBC Explorer window contains a menu, a toolbar, a status label, and two panes of database information.
An expand icon beside an object in the left pane indicates that the object contains other objects below it. To see those objects, click the expand icon. When an object is expanded to show its child objects, the expand icon becomes a contract icon. To hide child objects, click the contract icon.
The right pane contains tabbed pages that display the contents of objects highlighted in the left pane. The tabbed pages in the right pane vary depending on the type of object highlighted in the left pane. For example, when a database alias is highlighted in the left pane, the right pane displays a Definition page that contains the database URL, Driver, UserName, and other parameters, or properties. Bold parameter names indicate a parameter that cannot be modified. All other parameters that appear in the right pane can be edited there. The following tabbed pages may appear in the right hand pane:
For more information, launch the JDBC Explorer by selecting Tools|JDBC Explorer from the menu, then refer to its online book, JDBC Explorer.
The JDBC Explorer browses databases listed in the Connection URL History List section of the <home>/.jdatastore/jdbcExplorer.properties file. Additions are made to this list when you connect to a database using the connection
property editor of a Database
component.
You can use the JDBC Explorer to view, create, and modify database URLs. The following steps assume the URL is closed, and lists each task, briefly describing the steps needed to accomplish it:
View an URL
Create an URL
Modify an URL
Delete an URL
The Enter SQL page displays a window in which you can enter SQL statements, or specify and execute an existing .SQL file. The main part of the screen is an edit box where you can enter SQL statements. To the right of the edit box are three buttons, the Execute button, the Next button, and the Previous button. When an SQL SELECT statement is executed, the results of the query are displayed in an editable table, which is located below the edit box. This screen may need to be resized to view all its components. The page looks like this:
To query a database using SQL:
You can copy SQL statements from text files, a Help window, or other applications and paste them into the edit box. Some SQL servers require that the table name be entered in quotation marks, some do not require this.
Select the Data page to display the data in a selected table, view, or synonym. You can enter and edit records in a table on the Data page if the table permits write access, and if the Request Live Queries box of the Query page of the View|Options menu is checked. The Data page displays a table populated with the data from the selected table. A toolbar control is displayed across the top of the table for navigation and data modification. The Data page looks like this:
You can use the JDBC Explorer to view, edit, insert, and delete data in tables. The following list of tasks briefly describes the steps needed to accomplish each.
Edits only take effect when they are applied. To apply edits and make changes permanent: