Chapter 3 Building Physical Diagrams
You can use extended dependencies to define an order in the generation of views.
Extended dependencies are free links between PDM objects. These links help to make object relationships clearer between model objects. Usually, these links are not interpreted and checked by PowerDesigner as they are meant to be used for documentation purposes only. However, if you assign the <<DBCreateAfter>> stereotype to an extended dependency between views, it will be analyzed during generation.
The view from which you start the extended dependency is the dependent view and the view at the other end of the link is the influent view. The influent view will be generated before the dependent view.
If you create a reflexive and/or circular set of extended dependencies with the <<DBCreateAfter>> stereotype, an error message appears during the check model. If you choose to ignore this error, the views will be generated in alphabetical order, without taking into account the generation order, which could cause errors in the creation of views in the database.
You create the view DEPARTMENT STORE from the table STORE. The view retrieves information from the table as you can check in the SQL Query page of the view property sheet:
You decide to create another view called COMPUTER COUNTER to show only part of the department store offer. This view is created from the view DEPARTMENT STORE, and retrieves information from it.
By default views are generated in alphabetical order, so the generation of COMPUTER COUNTER will fail since the view DEPARTMENT STORE from which it depends is not generated. To bypass this problem, you can create a extended dependency with the <<DBCreateAfter>> stereotype from COMPUTER COUNTER to DEPARTMENT STORE.
This allows you to set an order in the generation of views: DEPARTMENT STORE will be generated before COMPUTER COUNTER.
You can create an extended dependency between views from the list of views or from the diagram.
For more information on how to create views from a list, see the "Defining a generation order for stored procedures" section in the Building Triggers and Procedures chapter.
To define a generation order for views from the diagram:
For more information on extended dependencies, see Using Extended Dependencies in the General Features Guide .
Copyright (C) 2005. Sybase Inc. All rights reserved. |