David PlotkinJack of All TradesVisio Enterprise may be the only modeling tool you need for moderate-sized projects
Visio Enterprise 5.0 is the latest incarnation of Visio Corp.s diagramming tool. Visio has always been a great tool for creating diagrams to aid in application development and database design. With Visio Enterprise, however, the tool has gone from a drag-and-drop diagram creator with limited networking and CASE tool properties to a full-fledged networking, logical design, and database diagramming and generation tool with which you can design and model your enterprise information architecture. The networking tool will read your network automatically and create a diagram using the available 14,000 vendor-specific shapes. You can also create maps of Web sites. On the database side, Visio Enterprise now supports robust database generation and options for reverse engineering to all major desktop and client/server databases. The product now also includes full support for version 1.2 of unified modeling language (UML) and object role modeling (ORM) notation. Furthermore, the wealth of documentation that comes with the product (including version 1.2 of UML) and the high quality of the online help are nice extras.
The Basics
If youve been using Visio as a diagramming tool, you can continue to do so with Visio Enterprise. This release adds many more templates to create block diagrams, calendars, flowcharts, Rummler-Brache process models, organization charts, office layouts, form designs, project timelines, and both geographic and directional maps. As with earlier versions, you begin by choosing a template, which includes a work area for diagram creation and one or more stencilscollections of shapes that you add to your diagram by dragging and dropping the shapes on the work area. Multiple toolbars provide buttons for adding and configuring connections between shapes; rotating, layering, and aligning shapes; applying color, fill, and patterns; and setting font, size, alignment, and formatting (including paragraph spacing and bullets) for text. You can add embedded text to most shapes you drag into the work area, and configure the shapes double-click behavior. Options include moving to another page, running a macro (Visio supports Visual Basic for Applications), editing the shapes text, and opening the shapes shapesheet, in which you can adjust the shapes special properties. You can also operate on multiple shapes, combining them using such operations as union, fragment, join, intersect, combine, and subtract.
Relational Modeling
One of the big additions to Visio Enterprise is the ability to create models and generate databases from those models. The File/New Database menu option offers you the ability to create Bachman, database model (either entity-relationship or object/relational), or ORM diagrams. Oddly, the ORM diagram is only a picture, and the template warns you that to create a true ORM diagram that can generate databases, you must use Visio Modeler (more on this later). Both the database tool and Visio Modeler can talk to a range of databases, including Microsoft Access, Paradox, SQL Server, Visual FoxPro, FoxPro, dBase, Sybase, and Oracle. The tool also supports ODBC; I connected to our Informix database by installing and configuring the Informix ODBC driver on my machine. Once you create a model, you can simply pick the driver you want to use, and Visio will limit you (if you want it to) to just the appropriate physical data types. You can view the model in either relational notation or IDEF1X, and select a host of display options, such as whether to view physical or conceptual names; whether to show keys, indices, and data types on a table; and whether to show cardinality, integrity, and the names of relationships. Visio Enterprise can also import and export Platinum Technology Inc.s ERwin ERX file format.
To create an entity or table in the database model (see Figure 1),
FIGURE 1 Creating an entity or table in the database model.
simply drag an entity shape into the working area. From there, you can set various properties, such as the table and entity names (which can be different, of course), triggers, check clauses, and the table definition. Although Visio doesnt do any syntax checking, you can type in the code for the triggers and check clauses. To create columns, you select the columns option from the right-click (popup) menu. For each column, you can define a physical and conceptual name, data type, collection, and check constraints (both range and valid values), you can enter a definition or other information in a Lotus Notes tab. Once youve defined some columns, you can finish defining the primary key and indexes for the table by designating the columns to include, their order, ascending or descending, and the type of index. The tool supports both unique and nonunique indexes, along with constraints. One strange omission is that you cant define default values for a column. This shortcoming means that although Informix (and several other database engines) support adding a column to a table without dropping the table, you cant add not null columns this way because you cant supply a default value. You can manually modify the generated data-definition language (DDL) file to accomplish this goal, but taking this extra step shouldnt be necessary.
Visio Enterprise handles relationship and foreign keys relatively well. The process for adding a relationship is fairly convoluted: You must choose the connector button, click the foreign key tool in the stencil, and draw the key from the one end to the many end. Visio does provide the foreign key in the connected table automatically. However, Visio doesnt support partial key migration; you can delete some of the migrated foreign keys, but that will generate an error in the database generation phase.
You can check your model at any time, and you should the tool doesnt flag many errors until you either check the model or attempt to generate the DDL. One example might be syntax errors in column and table names.
Visio Enterprise can generate DDL or connect to the database and create it directly. In addition, you can reverse engineer a database. If you do, you end up with a special stencil that lists all the tables in the database. You can then drag these tables into a diagram: Visio automatically draws foreign keys for you. The reverse-engineering process is very quick much faster than my copy of ERwin 3.5. Visio made fewer mistakes in the process than ERwin, as well. For example, it didnt mistake my Smallint columns for text (a known bug in ERwin for which Im still awaiting a fix). On the other hand, both ERwin and Visio missed the fact that some tables had a date field as part of their primary key constraint. Finally, you can run a compare between a model and a physical database, and either update the model or migrate those changes to the database.
ORM
If youre an ORM fan, Visio Modeler (shipped with Visio Enterprise) provides full ORM functionality (as well as duplicating functionality from the relational modeling tools in Visio). A toolbar provides all the objects including object types, various constraints, predicates, nesting, and role types. The product can generate standard SQL from an ORM diagram, and reverse engineer a relational database into ORM an interesting exercise for those just getting their feet wet in ORM. Unfortunately, terminology in Visio Modeler is different from main Visio; for example, you must choose to extract a physical catalog to begin the reverse-engineering process.
UML Support
UML has promised to unite the object-oriented modeling world, combining the characteristics of many competing OO standards into a single unified standard. But because of UMLs complexity, CASE tool vendor support has taken a while to arrive. Visio Enterprise, however, provides diagramming support for all the diagram UML types: use cases, static structure (class), state chart, sequence, deployment, component, collaboration, and activity diagrams. The UML diagram tool (see Figure 2)
FIGURE 2 The UML diagram tool.
provides a template for each diagram type, the diagram area itself, and small windows that display a hierarchical view of diagrams and object types (the UML navigator window) as well as any errors encountered (the errors window). The document window displays the description for the currently highlighted item.
As with the relational database tools I described, you add items to a UML diagram by dragging and dropping them into the diagram working area. You can choose which aspects of an item to display in the diagram. In a class, for example, you can choose whether to show the name, attributes, stereotypes, and operation parameters. Double clicking on an item opens the UML property editor dialog box. This dialog box varies from item type to item type, but each set of properties fully supports UML 1.2. For a class, for example, the UML Property Editor dialog box enables you to create and edit the name, stereotype, visibility, and properties such as whether the class is a root, leaf, abstract, or active class. Additionally, other tabs let you create and edit attributes, operations, receptions, template parameters, components, constraints, and tagged values.
As you build diagrams using the UML stencils, the UML navigator window displays all the diagrams, packages, and items in a hierarchical view. You can edit an item directly in the UML Navigator by double clicking on it. You can also add an item to a diagram to clicking on the item and dragging it into the diagram working area. However, if you drag an item from the UML navigator (or from another template) into a diagram that the UML methodology forbids, the error window displays a fairly cryptic message warning you of the error condition.
Visios help function is especially useful when you are using the UML diagramming tools. UML is a complex standard, and Visios Help provides an excellent set of definitions and explanations of the allowable options for each of the types of items available in UML. While the Help wont make you an expert at UML, it will keep you from making mistakes as you build your models.
You should not, however, mistake the UML diagram tools for a replacement for traditional CASE tools, such as Select Enterprise, Rational Rose, or Platinum Paradigm Plus. Although it is an excellent diagramming tool, Visio Enterprise neither generates nor reverse-engineers object-oriented code from such tools as Forté, nor can it generate either an object/relational or relational database schema directly. Furthermore, unlike these tools, it does not bridge to traditional database design tools, such as ERWin, or even to Visio Modeler.
Visio and the Web
Visio Enterprise can save its diagrams in about a dozen common formats, including as HTML pages that you can post on your Web site. You can attach hyperlinks to shapes in Visio diagrams, so a diagram can become a gateway to navigating to other pages. In addition, you can use a dial-up connection to connect to a Web site, and then use the Web Page Wizard to create a diagram of a Web site. Visio can represent all kinds of Web resources, including URLs, hyperlinks, FTP, MailTo, news groups, files, and graphics. You can even double-click on a URL (Web page) and have that page open in your default browser (provided that you are connected to the Internet). Displaying a URL isnt foolproof FrontPages dynamic URLs (such as search pages) can mislead Visio, and attempting to open such a URL will generate an error message from the Web server. But overall, Web site models can be extremely useful.
A Model Value
Visio Enterprise is a giant step up from previous incarnations of this tool. With added support for relational and OR modeling, and top-notch UML support, Visio Enterprise could be the only modeling tool you need for moderate-sized projects. It also adds even more robustness to the networking tools, and continues to do an excellent job as a general-purpose graphics drawing tool. It cant replace all aspects of your database design tool, nor does it generate or reverse-engineer object-oriented code. But for less than $1,000, or as an upgrade from existing versions of Visio ($695), Visio Enterprise represents an excellent value.
David Plotkin is a senior data administrator for Longs Drug Stores. He has been implementing both procedural and object-oriented systems for more than 15 years, and built metadata management environments in three companies, including the implementation of several corporate repositories. You can reach him via email at dplotkin@longs.com .
|
Most Popular This Week
IE Weekly Newsletter
Subscribe to the newsletter
|
|
|





