Welcome, we are now Quest! Learn more about Support at Quest

Toad for Oracle 12.1 - Guide to Using Toad for Oracle

Chapter 1: Getting Started
Welcome to Toad About This Guide Help and Resources Customize Toad Create and Manage Connections Execute and Manage Code Work with Database Objects Work with Data Grids
Chapter 2: Toad Without Code
New Online Options Manage Objects Rebuild Objects Use the Master Detail Browser Import and Export Data Compare Data, Objects, and More Automate Processes and Manage Projects
Chapter 3: Toad and Your Code

Use the Master Detail Browser

Contents

Master/Detail Browser

Generating XML Output

Selecting the Master Object

Adding Detail Datasets

Defining a Master/Detail Relationship


Was this topic helpful?

[Select Rating]



Master/Detail Browser

Use the Master/Detail browser to view or edit data from multiple tables, snapshots, views or queries linked by foreign keys or a user-defined master-detail relationship. This is typical of a database setup from an Entity/Relationship diagram, where one table's objects are related to another table's objects by a linking field or fields.

For example, you could start with the DEPARTMENT table, and display details. Select a department record in the Master grid, and the detail grid will display employee records for that department only. If multiple tables are linked by foreign keys, you can add additional details beneath the first.

To access the Master/Detail Browser

» From the Database menu, select Report | Master/Detail Browser.

Navigator

To the left of the Master Detail Browser is the Master Detail Navigator. As you add detail tables, they are added to the navigator under the original table. Using the navigator can make it much easier to control very detailed sets of master/details.

Within the navigator, you can hide or display the schema name and delete detail nodes.

You can use the navigator to find the grid for a specific detail table.

To find a detail

» In the Navigator, click on the node for the detail you want to view.

Note: In the Master Detail browser, the grid for that detail flashes in the lower grid pane.

Single Grid Mode

You can set Toad to display only one grid at a time by checking the Single Grid Mode box on the Master/Detail toolbar. Use the navigator to select which grid you want to see.

 


Was this topic helpful?

[Select Rating]



Generating XML Output

You can generate XML output from a master-detail relationship. From the master-detail grids, you can send a query to the Editor that will generate the output. Output will be created in XML Form, one XML document per row.

This feature is available only in Oracle 9iR2 and newer, and when the Master-Detail relationship consists of one master and one detail.

To generate XML output

  1. From the Master Detail browser, open or create a relationship that consists of one Master and one detail.
  2. Right-click on the master grid, and select Send XMLGEN Query to Editor.
  3. Switch to the Editor window in Toad.
  4. Execute the query to generate XML output.

    Toad creates an XML document for each row in the master dataset, with each XML document containing all corresponding detail rows.

To save XML output to disk

  1. Right-click on the Editor grid and choose Export BLOBs (longs, raws).
  2. Select the XMLDATA column from the Export this Column drop down.
  3. Enter or select a directory where you want the files stored in the Export Path box.
  4. Select the method of naming your files:
    • Use sequentially numbered files
    • Export to files named for the value in this column (select the column)
  5. Click OK.

 


Was this topic helpful?

[Select Rating]



Selecting the Master Object

Before you can add details, you first need to select the master object for the relationship view.

To select a master object

  1. From the Database | Report menu, select Master Detail Browser.
  2. In the Type box, select the type of object you want to use.
  3. In the owner box, select the schema that contains the object.
  4. In the Name box, select the name of the object.

    The grid populates with the contents of your selected object.

 


Was this topic helpful?

[Select Rating]



Related Documents