187 9 CASE Tools for Logical Database Design atabase design is just one part of the analysis and design phase of creating effective business application software (see Figure 9.1), but it is often the part that is the most challenging and the most critical to performance. In the previous chapters, we explored the classic ways of creating efficient and effective database designs, including ER modeling and the transformation of the ER models into constructs by transforma- tion rules. We also examined normalization, normal forms and denor- malization, and specific topologies used in warehousing, such as star schema. All this information may leave your head spinning! This chapter focuses on commercially available tools to simplify these design processes. These computer-aided system engineering, or CASE, tools provide functions that assist in system design. CASE tools are widely used in numerous industries and domains, such as circuit design, manufacturing, and architecture. Logical database design is another area where CASE tools have proven effective. This chapter explores the offerings of the major vendors in this space: IBM, Computer Associates, and Sybase. Each of these companies offers powerful, feature- rich technology for developing logical database designs and transition- ing them into physical databases you can use. Although it is impossible to present information on software prod- ucts without some subjectivity and comment, we have sincerely attempted to discuss the capabilities of these products with minimal product bias or critique. Also, it is impossible to describe the features of D Teorey.book Page 187 Saturday, July 16, 2005 12:57 PM 188 CHAPTER 9 CASE Tools for Logical Database Design these products in great detail in a chapter of this sort (a user manual of many hundred pages could be written describing each), so we have set the bar slightly lower, with the aim of surveying these products to give the reader a taste for the capabilities they provide. Further details can be obtained from the manufacturer’s Web sites, which are listed in the Lit- erature Summary at the end of the chapter. 9.1 Introduction to the CASE Tools In this chapter, we will introduce some of the most popular and power- ful products available for helping with logical database design: IBM’s Rational Data Architect, Computer Associate’s AllFusion ERwin Data Modeler, and Sybase’s PowerDesigner. These CASE tools help the designer develop a well-designed database by walking through a process of conceptual design, logical design and physical creation, as shown in Figure 9.2. Computer Associates’ AllFusion ERwin Data Modeler has been around the longest. A stand-alone product, AllFusion ERwin’s strengths stem from relatively strong support of physical data modeling, the Figure 9.1 Business system life cycle (courtesy IBM Corp.) Teorey.book Page 188 Saturday, July 16, 2005 12:57 PM 9.1 Introduction to the CASE Tools 189 broadest set of technology partners, and third-party training. What it does it does well, but in recent years it has lagged in some advanced fea- tures. Sybase’s PowerDesigner has come on strong in the past few years, challenging AllFusion ERwin. It has some advantages in reporting and some advanced features that will be described later in this chapter. IBM’s Rational Data Architect is a new product that supplants IBM’s previous product, Rational Rose Data Modeler. Its strength lies in strong design checking; rich integration with IBM’s broad software development plat- form, including products from their Rational, Information Management, and Tivoli divisions; and advanced features that will be described below. In previous chapters, we discussed the aspects of logical database design that CASE tools help design, annotate, apply, and modify. These include, for example, ER, and UML modeling, and how this modeling can be used to develop a logical database design. Within the ER relation- ship design, there are several types of entity definitions and relationship modeling (unrelated, one-to-many, and many-to-many). These relation- ships are combined and denormalized into schema patterns known as normal forms (e.g., 3NF, star schema, snowflake schema). An effective design requires the clear definition of keys, such as the primary key, the foreign key, and unique keys within relationships. The addition of con- straints to limit the usage (and abuses) of the system within reasonable bounds or business rules is also critical. The effective logical design of Figure 9.2 Database design process Teorey.book Page 189 Saturday, July 16, 2005 12:57 PM 190 CHAPTER 9 CASE Tools for Logical Database Design the database will have a profound impact on the performance of the sys- tem, as well as the ease with which the database system can be main- tained and extended. There are several other CASE products that we will not discuss in this book. A few additional products worth investigating include Data- namic’s DeZign for Databases, QDesigner by Quest Software, Visible Analyst by Standard, and Embarcadero ER/Studio. The Visual Studio .NET Enterprise Architect edition includes a version of Visio with some database design stencils that can be used to create ER models. The cost and function of these tools vary wildly, from open source products up through enterprise software that costs thousands of dollars per license. The full development cycle includes an iterative cycle of understand- ing business requirements; defining product requirements; analysis and design; implementation; testing (component, integration, and system); deployment; administration and optimization; and change manage- ment. No single product currently covers that entire scope. Instead, product vendors provide, to varying degrees, suites of products that focus on portions of that cycle. CASE tools for database design largely focus on the analysis and design, and to a lesser degree testing, of the database model and creation as illustrated in Figure 9.2. CASE tools provide software that simplifies or automates some of the steps described in Figure 9.2. Conceptual design includes steps such as describing the business entities and functional requirements of the data- base; logical design includes definition of entity relationships and nor- mal forms; physical database design helps transform the logical design into actual database objects, such as tables, indexes, and constraints. The software tools provide significant value to database designers by: 1. Dramatically reducing the complexity of conceptual and logical design, both of which can be rather difficult to do well. This reduced complexity results in better database design in less time and with less skill requirements for the user. 2. Automating transformation of the logical design to the physical design (at least the basic physical design). This not only reduces time and skill requirements for the designer, but significantly removes chances of manual error in performing the conversion from the logical model to the physical data definition language (DDL), which the database server will “consume” (i.e., as input) to create the physical database. 3. Providing the reporting, round trip engineering, and reverse engi- neering that make such tools invaluable in maintaining systems Teorey.book Page 190 Saturday, July 16, 2005 12:57 PM 9.2 Key Capabilities to Watch For 191 over a long period of time. System design can and does evolve over time due to changing and expanding business needs. Also, the people who design the system (sometimes teams of people) may not be the same as those charged with maintaining the sys- tem. The complexity of large systems combined with the need for continuous adaptability, virtually necessitates the use of CASE tools to help visualize, reverse engineer, and track the system design over time. You can find a broader list of available database design tools at the Web site “Database Answers” (http://www.databaseanswers.com/model- ling_tools.htm), maintained by David Alex Lamb at Queen’s University in Kingston, Canada. 9.2 Key Capabilities to Watch For Design tools should be able to help you with both data modeling and logical database design. Both processes are important. A good distinction between these appears on the “Database Answers” Web site, cited above. For data modeling, the question you are asking is: What does the world being modeled look like? In particular, you are looking for similar- ities between things. Then you identify a “supertype” of thing which may have subtypes. For example, Corporate Customers and Personal Customers. If, for example, supplier contacts are conceptually different things from customer contacts, then the answer is that they should be modeled separately. On the other hand, if they are merely subsets of the same thing, then treat them as the same thing. For database design, you are answering a different question: How can I efficiently design a database that will support the functions of a proposed application or Web site? The key task here is to identify simi- larities between entities so that you can integrate them into the same table, usually with a “Type” indicator. For example, a Customer table, which combines all attributes of both Corporate and Personal Custom- ers. As a result, it is possible to spend a great deal of time breaking things out when creating a Data Model, and then collapsing them back together when designing the corresponding database. Support for programmable and physical design attributes with a design tool can also expand the value a tool provides. In database terms, aspects to watch for will include support for indexes, uniqueness, trig- gers, and stored procedures. Teorey.book Page 191 Saturday, July 16, 2005 12:57 PM . logical database design that CASE tools help design, annotate, apply, and modify. These include, for example, ER, and UML modeling, and how this modeling can be used to develop a logical database design. . logical database design: IBM’s Rational Data Architect, Computer Associate’s AllFusion ERwin Data Modeler, and Sybase’s PowerDesigner. These CASE tools help the designer develop a well-designed database. effective logical design of Figure 9.2 Database design process Teorey.book Page 189 Saturday, July 16, 2005 12:57 PM 190 CHAPTER 9 CASE Tools for Logical Database Design the database will have