Previous Next vertical dots separating previous/next from contents/index/pdf

Exploring Databases with the DbXplorer

BEA Workshop Studio allows you to connect to any database and analyze database schemas, tables and columns. The DbXplorer view provides an intuitive interface for database access. You can set up the database connection, drill down into database artifacts, query the data in an existing table or column, and generate EJB3 persistence or Hibernate mappings.

Establishing the database connection

In order to take advantage of Workshop Studio's database capabilities, you must first establish the connection to the database. This is done through the DbXplorer view. During the connection setup the database driver, connection URL, and login information are required.

Note: If the DbXplorer is not currently open, go to the Window menu and select Show View > DbXplorer.

  1. From the DbXplorer view, right click and select New Connection.
  2. Click New Connection

  3. Assign a name to the Connection Name field and then click Next. The name can be arbitrary and does not have to match the actual name of the database server.
  4. Enter a name for the connection

  5. Add the database driver to the Driver Classpath by clicking the Add button and browsing to the location of the JAR or ZIP file(s) containing the driver. After adding the driver, click Next.
  6. Add the database driver to the classpath

  7. Add the fully qualified name of the JDBC Driver Class or Browse to the appropriate driver. Workshop provides sample Database URL's for some of the common databases which can be accessed from the Populate from database defaults pull down menu. If the database requires login information, it can be added to the User and Password fields.
  8. Click the database technology name to populate from its defaults

  9. Finally, click the Test Connection button to verify that the connection information is correct and click Finish. The new database connection should now appear in the DbXplorer.
  10. Click Test Connection to verify success

    Congratulations! The new database connection has been configured and should now appear in the DbXplorer. If at anytime, the connection properties need to be updated, right click the connection and select Edit Connection.

Once the connection has been established, use DbXplorer to browse database contents.

  1. By expanding the branches for the connection, you can display the database, schemas, tables, and columns. Notice that DbXplorer denotes which columns have been designated as primary keys.
  2. Expand table nodes to view column names

  3. While browsing database artifacts, the Properties view displays the relevant properties of the component. In the below example, the properties of the address column are displayed.
  4. See the Properties view for table and column properties

  5. For large databases with many schemas, it might be necessary to hide the schemas not in use. Right-click a schema and select Hide Selected Schemas to remove it from the DbXplorer (this step does not modify the database or the schemas). To display all of the schemas again, right click the database and select Show Hidden Schemas.

Related concepts

Viewing the Database Diagram and Running Queries

Generating Hibernate Mappings

Generating EJB3 Persistence Mappings

 

Skip navigation bar   Back to Top