Chapter 3 Building Physical Diagrams


Creating relations between selected tables

Steps To create relations between selected tables:

  1. Double-click a view in the diagram to display the view property sheet.
  2. Click the SQL Query tab.

    The SQL Query page appears. It shows each SELECT query in the Query dropdown listbox. The text for the query appears in the textbox.
  3. Select a query from the Query dropdown listbox. This is the query that contains the SELECT statement to which you want to add a table.
  4. Click the Properties tool from the tool bar at the top of the page.


    The property sheet for the SELECT query appears. The query definition is shown in the textbox.
  5. Click the Tables tab if you want to add a table to the view.

    or

    Click the Columns tab if you want to add columns to the view.

    The Tables or Columns page appears. It lists the tables or columns currently included in the SELECT statement.
  6. Click the Add a Row tool.

    Click the new line in the list.

    or

    Click a new line in the list.

    A dropdown list appears. It lists all the available tables in the model, or all the available columns for the tables currently defined for the view.
  7. Select a table name.

    or

    Select a column name.

    The table name, or column name, is added to the list.

    Note   Adding multiple tables or columns
    You can add multiple tables or columns to a view by clicking a new line in the list for each table or column that you want to add, and selecting the appropriate table or column from the dropdown list.

  8. Click OK.

    You return to the SQL query page. The table and all of its columns, or the selected new columns, are added to the SELECT statement. If you select tables that share a reference link, the reference is automatically added in a WHERE clause to the query.
  9. Click OK.

    The new table and columns appear in the view symbol.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.