Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

DB2

Posted Dec 27, 2007

DB2 9.5 and IBM Data Studio: Overview Diagrams, Continued

By Paul Zikopoulos

So far in this series about the IBM Data Studio integrated development environment (IDE) that’s new with DB2 9.5, I’ve shown you how to set up database connection objects and the actions that you can perform on them. In addition, I introduced you (in Part 2) to some of the features available in the Database Explorer view, and in Part 3 to the concept of overview diagrams. In this article, I’ll finish my tour of overview diagrams and introduce you to some powerful features you can use with them to make them even more useful than simple, quick visuals.

Assumptions if you’re starting here...

I recommend that you start with Part 1 because we have been building on the concepts and objects created in this series sequentially. For this article, I assume that you’ve created an overview diagram and populated it with the DJCOUNTRIES and DJFRIENDS tables, as I showed you how to do in Part 3. Furthermore, I assume you’ve selected all of the display options that you want to apply to the overview diagram as a whole. (Right-click the white space to get these options.)

At this point, your overview diagram should look similar to the following figure:

The palette and formatting options

IBM Data Studio provides you with an overview diagram palette that you can use to add annotations, objects, and other identifiers to your overview diagrams that can help in the understanding of the generated topology.

The Select tool is used to select objects in the overview diagram.

With the Zoom tool, you can select an area of the overview diagram to enlarge. A zoom icon appears () when you select the Zoom tool. Click and drag to create a bounding box (), sometimes called a marquee, around the area that you want to zoom into, and release the mouse button as shown on the left side of the figure:

You can see in the previous figure that the Outline view has its own bounding box (shown in blue) that you can use to navigate large overview diagrams. The Outline view is especially useful when you have zoomed into your overview diagram. To zoom out, ensure the Zoom tool is selected, press Shift, and release the mouse button. Alternatively, you can right-click anywhere in the overview diagram and select one of the Zoom options in the pop-up menu:

Note: You can access all the overview diagram functions available in the Palette and some that aren’t available from the palette by right-clicking and selecting an option from its pop-up menu.

The Note option allows you to add notes to your overview diagrams. This is especially useful when you want to share or discuss your overview diagrams with colleagues. You can see all of the note options by selecting the drop-down arrow () beside the respective drawer:

I added a note and some text (using the corresponding icons in the Palette) in the following overview diagram:

Note: Pressing Enter when you are typing the text for a note closes the note. As you type, the text displays in one long line. I recommend that you type all the text you want in the note, press Enter, and then resize the note using a control knob when it’s highlighted. (The text will adjust automatically and flow within the new size.)

You can use the Note Attachment icon () to attach a note to an object in an overview diagram. Whenever you move the object, the note, once attached, will follow.

The Intellectual Property tool adds a note to your overview diagram with a set of predefined fields about the creation and ownership of the diagram. This can be useful for ownership meta-data that you want to follow the overview diagram throughout your enterprise or beyond. You can see in the following figure that I’ve added this kind of information to the lower-right corner of the overview diagram:

You can also attach intellectual property notes to objects in the same manner as you attach other notes. These objects (notes, text, and intellectual property notes) all appear in the Outline view:

The Geometric Shapes tool lets you add various shapes to your overview diagram. These can be useful to group together objects or to represent different aspects of your system, among other things. To see all of the geometric shapes in the Palette, click each drawer to expand its contents:

You can click any of the Geometric Shapes drawers (indicated with drop-down arrows) to see subcategories within them:

Alternatively, right-click, click Add, and select a shape:

In the following figure, I’ve added a Cylinder to my overview diagram and labeled it with the name of the actual storage device where the respective DB2 data files reside on my file system:

As with notes and intellectual properties notes, you can also click a geometric shape and connect it to objects in the overview diagram.

Once you’ve added a geometric shape to your overview diagram, formatting options are available when you right-click a selected object. In the following overview diagram, you can see that I’ve added a 3D Rectangle and labeled it with the name of the table space where the DJCOUNTRIES and DJFRIENDS tables reside in the SAMPLE database:

In the previous diagram, you can also see that I’ve used some formatting features that are also available from the pop-up menu. You can experiment with all the options, as shown below:

Using the Properties view, you can also adjust the display characteristics of the objects that you add to an overview diagram:

Most of these options are self-explanatory so I encourage you to experiment with them.

Some configuration options and other tricks that help you get the job done

A number of configuration features are also available. For example, you can right-click in the Palette and configure its display:

You can use the Settings option from the pop-up menu to change the way the Palette looks. (Some of these options are available in the menus I’ve already shown you, and some options can only be set from the Palette Settings window.)

For example, perhaps you want the Palette to always expand all of the objects within a drawer. If you recall, I had to click to expand the contents of Geometric Shapes and there are more shapes that can only be viewed when expanded within the Rectangle Types and Polygon drawers. If you always wanted the Palette to display all available geometric shapes, you could select the Never close option.

When you have a large overview diagram, it can become difficult (and inconvenient) to select the objects you want to format. IBM Data Studio has a number of features (available from the pop-up menu) to help you manage large overview diagrams and their respective operations:

You can also add new columns, keys, triggers, or indexes to an overview diagram and associate them with a specific table. To do this, simply double-click a table and a menu will appear with these options:

A number of formatting options are also available from the View menu. You can use these options to add gridlines and rulers, to set up snap-to-grid operations for your mouse pointer, and to display page breaks (especially helpful for larger overview diagrams). In the following figure, I added a ruler and grid lines to the view, which helps to properly place objects:

Wrapping it up...

In this article, I took you through a number of other features that are available with the overview diagram feature in IBM Data Studio, which is included in DB2 9.5. While I didn’t show you all the features, I hope I’ve outlined enough of them to grab your interest and motivate you to experiment more. In the next part of this series, I’ll introduce you to the the OLE DB function creation facilities that are available in IBM Data Studio.

» See All Articles by Columnist Paul C. Zikopoulos

Trademarks

IBM and DB2 are registered trademarks of International Business Machines Corporation in the United States, other countries, or both.

Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

Copyright International Business Machines Corporation, 2007. All rights reserved.

Disclaimer

The opinions, solutions, and advice in this article are from the author’s experiences and are not intended to represent official communication from IBM or an endorsement of any products listed within. Neither the author nor IBM is liable for any of the contents in this article. The accuracy of the information in this article is based on the author’s knowledge at the time of writing.



DB2 Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.