Fast Track Model Based Design and Development with ... · redesign, then regenerate the database...

15
Fast Track Model Based Design and Development with Oracle9i Designer An Oracle White Paper August 2002

Transcript of Fast Track Model Based Design and Development with ... · redesign, then regenerate the database...

Page 1: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Fast Track Model Based Design and Development with Oracle9i Designer An Oracle White Paper August 2002

Page 2: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Fast Track Model Based Design and Development with Oracle9i Designer

Executive Overivew.......................................................................................... 3 Introduction ....................................................................................................... 3 What Is Oracle9i Designer? ............................................................................. 3

Modeling System Requirements ................................................................. 4 The Design Editor ........................................................................................ 5 The Designer Repository............................................................................. 5

Modeling Oracle9i databases........................................................................... 6 What Can You Model?................................................................................. 7 Reference Code Tables ................................................................................ 8 Distributed Database Models...................................................................... 8

Generating a Database Based On Your Models........................................... 9 Capturing the Design of Existing Database Schemas................................ 10 Creating Multi-tier Applications Using the Server API ............................. 11 Impact Analysis Using the Dependency Manager...................................... 12 Conclusion........................................................................................................ 14

Fast Track Model Based Design and Development with Oracle9i Designer Page 2

Page 3: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Fast Track Model Based Design and Development with Oracle9i Designer

EXECUTIVE OVERIVEW E-business solutions may be the new, fashionable key technology, but it does not make client/server applications redundant!

Regardless of the environment in which you implement your application, two crucial common factors exist - the Oracle database and the legacy application. Most Internet based or client/server database applications run on the powerful, reliable and scalable Oracle9i database. Many evolve from legacy client/server applications, running on previous releases of this industry-leading product.

Only one product, Oracle9i Designer, offers a toolset to model, generate and capture the requirements and design of these databases and applications quickly, accurately and efficiently, and also to assess the impact of changing those designs or applications.

INTRODUCTION This white paper focuses on the key Designer elements that enable organizations to ‘fast track’ their development activities to respond quickly to market changes and meet customers and partners needs in today’s deadline driven world. The paper gives an overview of Designer, then describes the process of using the:

• Design Editor and Server Generator to create the database, its objects and Application Programming Interface (API) to implement multi-tier applications

• Dependency Manager to analyze the impact of changing the database or application design

WHAT IS ORACLE9i DESIGNER? Oracle9i Designer is a scalable, flexible and integrated environment for developing client/server applications or leading e-business solutions that leverage the power of the Internet. It is part of the Oracle9i Developer Suite (9iDS) of development and business intelligence tools.

Designer promotes and supports Oracle9i and also integrates fully with Oracle9i Forms. It supports, but does not enforce, different approaches to development so organizations can use their preferred method, for example End-User Driven (Rapid

Fast Track Model Based Design and Development with Oracle9i Designer Page 3

Page 4: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Application Development), Information Driven (Information Engineering), Process Model Driven or Design Capture Driven.

Designer also integrates with Oracle9i JDeveloper, Oracle’s J2EE™ and XML development environment with end-to-end support for developing, debugging, and deploying business applications and Web services. This provides a complete, end-to-end development environment for modeling designing and generating e-business Java applications that use the Oracle9i Database.

The Designer Front Panel is the one stop starting point for access to all its modeling, design and generation and administrative tools.

Figure 1. The Oracle9i Designer Front Panel

Modeling System Requirements Designer offers four tools to model business processes and system requirements. Process Modeler records business processes, while the Entity Relationship Diagrammer, Function Hierarchy Diagrammer and Dataflow Diagrammer record the things of importance to a business, the functions it performs and data that flows through the business. These tools use industry standard Business Process Re-engineering (BPR) or Information Engineering (IE) techniques and notation.

You can then transform your models to create first cut server designs and/or application designs using the Database and Application Design Transformers.

Fast Track Model Based Design and Development with Oracle9i Designer Page 4

Page 5: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

The Design Editor Alternatively, organizations may choose to model their client/server or e-business application from scratch, or protect current investment by capturing the design of a legacy application.

Designer makes this possible with the Design Editor, a powerful, integrated, graphical environment for designing, generating and capturing database and application designs. The Design Editor combines drag and drop functionality, multiple diagram types, preference palettes and object libraries to provide a workbench for new or experienced business or technical users.

Figure 2. The Design Editor

The Design Editor is the control center, where organizations model Oracle9i databases and multi-tier e-business applications. Use the Server Generator to create the database, its objects and API as necessary, generate Forms, Oracle9i Reports, Web PL/SQL and also create application logic for PL/SQL, JavaScript and Visual Basic.

The Designer Repository Supporting the extensive features of Designer is the Repository, used to store and manage database and application metadata in a controlled environment throughout the software development lifecycle, for example to store server models or reverse engineered designs of an existing database application.

The Repository facilitates team working and project management by giving users immediate access to one accurate, synchronized source of metadata. It supports

Fast Track Model Based Design and Development with Oracle9i Designer Page 5

Page 6: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

files and folders and provides functionality for maintaining multiple versions and configurations of objects.

Note – The Designer Repository is now also available as a separate component to Designer in Oracle9iDS, called Oracle9i Software Configuration Manager (SCM).

Figure 3. Repository Support for Designer

MODELING ORACLE9i DATABASES Designer offers three methods for modeling a database, which give many advantages over creating the physical database and its objects directly. You can base your design on real, business processes and system requirements, design from scratch or capture the design of a legacy application.

Whichever method used, modeling the database graphically in the Design Editor enables you to visualize it quickly and easily. Organizations can focus on analyzing product and customer requirements to provide a sound foundation that they can refer to, reapply and amend as necessary. Business and technical users have the opportunity to discuss and identify common parts of the design and assess the impact of changes within the organization and with its customers. The finished model is ready for generating using the Server Generator to reduce coding requirements.

Application development is faster, more productive, less error prone and so helps to improve quality because organizations can design a database that hits closer to the target first time.

Fast Track Model Based Design and Development with Oracle9i Designer Page 6

Page 7: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

What Can You Model? Designer enables you to model much more than standard relational schema constructs such as triggers, primary keys and mandatory or optional columns.

You can model, for example, Oracle object types and PL/SQL structures such as functions and packages. Server Model Diagrams represent these objects graphically in the Design Editor to enable users to easily see the properties and relationships of all database objects.

When you define database objects such as tables and columns, the Design Editor adds default attribute values automatically, for example the name, length and accuracy of a column. Yet the Design Editor also gives you the ability to enhance the definition significantly, by adding attributes for how objects display in the application.

Figure 4. A Typical Server Model Diagram Showing Relational Constructs

This is a powerful key feature of Design Editor. You can define attributes such as hint text, item names, the size and position of an object and whether an image or text should display. Organizations can apply consistent ‘user interface standards’ for objects whenever they display across the application to create a ‘style guide’ stored with the metadata in the Repository.

Fast Track Model Based Design and Development with Oracle9i Designer Page 7

Page 8: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Figure 5. Examples of Defining UI Standards for Database Objects

Reference Code Tables Furthermore, the Design Editor supports the modeling of reference code tables, used to validate the allowable values you can define for columns or use in associated domains. They contain the allowable values together with their abbreviations and meanings.

Reference code tables offer many advantages over hard-coding allowable values. Firstly, they help to ensure data integrity because you can store the validation criteria centrally on the server. Reference code tables are easier and cheaper to maintain because, if business rules change, the organization only has to amend the reference code table once, regardless of how many objects or applications use it. This reduces the amount of coding necessary, aiding a more efficient development lifecycle.

Reference code tables are also flexible because you can use the same table with or without the Server API in several applications, regardless of type, for example Forms, Reports, and PL/SQL Web applications.

Distributed Database Models The Design Editor can also support the modeling of complex but efficient and flexible architectures that implement distributed database structures. A distributed database model represents a network of databases using multiple servers but which appears to users as one, logical database. This provides the ability to logically combine physically separate databases to enable all users to access and modify data simultaneously.

The Design Editor supports replicating tables or groups of related objects or providing a materialized view of an object at a particular time or in a particular

Fast Track Model Based Design and Development with Oracle9i Designer Page 8

Page 9: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

state. For frequently accessed tables, this reduces the need to transfer data across a network repeatedly to help maximize performance.

GENERATING A DATABASE BASED ON YOUR MODELS A powerful key feature of the Design Editor is the Server Generator tool, which enables you to build a database from your designs and at any time capture an existing database into the Repository. Organizations can generate or capture, redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development process ensures the server model and objects synchronize with the database and application itself.

The Server Generator can generate databases for any target platform from the metadata stored in the Repository. You can generate:

• the physical Oracle or non-Oracle database itself

• objects defined in the Repository directly onto the database, for example tables

• Data Definition Language (DDL) scripts to create the physical database or database objects later

• the PL/SQL Server API interface that applications call to insert, update, delete and lock data in the tables generated from your designs, and also perform queries on those tables

Figure 6. Features of the Server Generator

Fast Track Model Based Design and Development with Oracle9i Designer Page 9

Page 10: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

CAPTURING THE DESIGN OF EXISTING DATABASE SCHEMAS At any time organizations can use the Server Generator to capture the design of an existing Oracle or non-Oracle database application.

Figure 7. Database Design and Capture in Designer

To ‘fast track’ the design and development of e-business solutions, you can quickly capture and redesign a legacy database then regenerate it as an Oracle9i database. If necessary, you can use the Oracle9i migration utilities to migrate a previous release of the Oracle database to Oracle9i, then capture that design into Designer to make any necessary changes.

The Server Generator extracts database definitions from the source database and its objects or the DDL scripts used to create them, and then creates equivalent definitions in the Repository. If you already captured this database previously, Server Generator reconciles the existing Repository definitions with the new information extracted.

There are two views of the object captured into the Repository:

• User objects, which represent the physical implementation of the objects captured from the connected user's schema. They display in red under the Design Editor Navigator DB Admin tab.

• Base objects, which represent the logical design of the objects captured into the Repository. You can edit them to change the design of, for example relational tables, sequences, PL/SQL definitions and Oracle object types. They display under the Design Editor Navigator Server Model tab.

Fast Track Model Based Design and Development with Oracle9i Designer Page 10

Page 11: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

CREATING MULTI-TIER APPLICATIONS USING THE SERVER API The Server API is a powerful and easy-to-use PL/SQL interface that client applications call to perform DML operations on tables and also perform queries on those tables. The Server API passes a DML operation or query from the client application to the relevant database table, then passes the information returned back to the application after the action as necessary.

The Server API is crucial to creating multi-tier applications, where both the database and API are separate to the client and maybe stored together on the same physical server. This enables organizations to implement relatively thin clients, for example installing Forms or Web PL/SQL applications on a client without any application logic.

The Server API consists of the Table API (also known as table handlers) and the Module Component API (also known as module handlers). The Table API provides PL/SQL packages and triggers that applications call to insert, update, delete and lock table rows. Module Component APIs are based on stored procedures or views. They provide generated insert, update, delete and lock procedures that call equivalent Table API procedures to perform the action on the table used.

Designer enables you to fully customize the API to perform actions relevant to your business rules and application design. This involves defining your own pre- or post-event code, executed at specified points in the generated API code.

Figure 8. Customizing the Server API

Fast Track Model Based Design and Development with Oracle9i Designer Page 11

Page 12: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Pre-event code enhances the information passed to the database before modifying the table, for example to record information about inserting or updating a row for auditing purposes. Post-event code passes additional information back to the calling application after modifying a table, for example the number of times a row is inserted.

If a table API procedure is called directly from the application, only the event code embedded in that procedure is executed. If a Table API trigger is fired implicitly for a table, any pre-event code defined for the trigger is executed first, followed by the trigger code, called procedure code, then the post-event trigger code.

IMPACT ANALYSIS USING THE DEPENDENCY MANAGER One of the impressive features of the Repository is the Dependency Manager, which enables organizations to identify and analyze the dependencies between structured and unstructured data. A dependency is a relationship, association or requirement between two software development objects. There are two types of dependency:

• everything that an object uses, for example a form uses the EMP table

• all the things used by an object, for example a menu is used by a form

Figure 9. Impact Analysis: The Problem

Fast Track Model Based Design and Development with Oracle9i Designer Page 12

Page 13: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Impact Analysis is crucial for managing configurations and releases of the application. In a complex application, an organization may have difficulty identifying the impact of changing one object because many dependencies exist between each object. Dependencies show all the objects necessary for a configuration or release to ensure a relationship, association or requirement is not broken. Without impact analysis, how do you know if an object is missing?

The Dependency Manager uses parsers to identify the dependencies and it contains a wide range of powerful parsers for Oracle Forms, Reports, Menu and Object and PL/SQL Libraries, Java, C / Pro*C, SQL, PL/SQL, and a Structured Analyzer to analyze elements in the Oracle Designer Model.

For example, for an Oracle Form, the Dependency Manager can display many dependencies, such as the tables and columns used, the called modules and references from other Forms.

The Dependency Manager parsers are written in Java using open developer APIs. Therefore, if organizations store files in the Repository for which there is no parser, such as COBOL routines, they can easily write and plug user-defined parsers into this architecture.

Figure 10. Dependencies Viewed in the Dependency Manager

Fast Track Model Based Design and Development with Oracle9i Designer Page 13

Page 14: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

The Dependency Manager contains a list of parser mappings to define what parser to use for each file extension. It calls the appropriate parser and generates XML to describe the dependencies found. If it identifies data that the parser cannot handle, it calls the appropriate other parser and nests that XML output in the original XML, then imports the dependency information into the Repository. Over time, users can see the dependency information for the whole application build up.

CONCLUSION Recent enhancements have significantly improved Oracle9i Designer’s ‘fast track’ model based approach to design and development.

Designer supports the latest release of the Oracle database, Oracle9i and other development tools such as Oracle9i JDeveloper and Oracle9i Forms. Together with new functionality for managing configurations and analyzing the impact of changes, Designer can easily support the development of larger scale, complex database applications and J2EE™ e-business Java applications.

Designer offers a productive, flexible, efficient, accurate and automatic approach that is easy to manage and maintain. Organizations can reduce the amount of coding necessary, focus on analysis and design and therefore aim to improve the quality of the finished application by hitting the target first time.

Therefore Designer is the product to use to rapidly develop scalable, distributed, cross-platform client/server and e-business applications.

Fast Track Model Based Design and Development with Oracle9i Designer Page 14

Page 15: Fast Track Model Based Design and Development with ... · redesign, then regenerate the database continuously and seamlessly. This ‘real world’ iterative design and development

Fast Track Model Based Design and Development with Oracle9i Designer August 2002 Author: Dominic Battiston Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 www.oracle.com Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Copyright © 2002 Oracle Corporation All rights reserved.