Object-Relational Mappings: Using SQL Schema Viewer

This document describes the following:


1. Using SQL Schema Viewer

OEPE allows you to examine your database schema using SQL Schema Viewer that displays tables and relationships between them.

The viewer displays tables as table nodes. Each node lists all the columns in a table and shows column data types. The node also provides primary and foreign key indicators in a form of icons. Foreign key relationships between tables are represented by links in a form of arrows.

To use the SQL Schema Viewer, follow this procedure:

  1. Click Window > Show View > Data Source Explorer from the top-level menu. This will open the Data Source Explorer view.
  2. Set up and configure a database connection.
  3. Expand the database connection node to the database, and then to the schema or a particular table in the schema, as Figure 1 shows.



    Figure 1.
    Expanded Database Node View


  4. Right-click on the schema or table name, and select Show in Schema Viewer, as Figure 2 shows. This will open the schema viewer displying the schema, as Figure 3 shows.



    Figure 2.
    Show in Schema Viewer Menu





    Figure 3.
    Schema Viewer



    Notice that if you open the viewer from a table, this table will be selected in the viewer (similar to the EMPLOYEE table that Figure 3 demonstrates).
  5. Using the schema viewer, you can do the following:

    • select tables, columns, and relationships by clicking on their representations;
    • highlight tables, columns, and relationships by mousing over them;
    • display the tool-tip text containing properties by mousing over the table header or column;
    • zoom in and out of the display by using either a combo box located on the viewer menu, or a menu that pops up upon the right click;
    • export the schema diagram to the image by clicking on the corresponding icon located on the viewer menu;
    • print the schema diagram by clicking on the corresponding icon located on the viewer menu;
    • edit SQL statements by clicking on the corresponding icon located on the viewer menu. Note that the SQL Scrapbook opens showing the corresponding connection profile.