
Chapter 3 DBMS Resource File Reference
Generating and reverse engineering extended objects
Some DBMSs have objects that cannot be represented by the standard PowerDesigner model objects. However, you can work with these objects, generate and reverse-engineer them through the use of extended objects. To do this you must first create an extended object, and then define its generation and reverse engineering scripts.
To create an extended object:
- Select Database→Edit Current DBMS to open the DBMS Properties window, and then expand the Profile category in the left-hand pane.
- If there is not an entry for Extended Object in this category, then create one by right-clicking Profile and selecting Add Metaclasses from the contextual menu. In the Selection box, click the PdCommon sub-tab, select Extended Object and click OK to add it to the list of objects.
- Right-click the Extended Object entry, and select New→Stereotype from the contextual menu to create a new stereotype, which will be used to define your new object.
- Enter the name of your new object and select the Use as metaclass checkbox. This will ensure that the new object appears in the PowerDesigner menus and has its own special browser category.
You can add attributes to the object, create templates to define its form for generation and reverse engineering, and produce custom forms for use in property sheets. For more information, see the Extending your Models with Profiles chapter.
Once you have defined your object, you need to enable its generation.
To define generation and reverse engineering scripts for an extended object:
- Right-click the Script/Objects category, and then select Add Items from the contextual menu to open a Selection dialog that lists all the objects available in the model.
- Select your new extended object in the list, and then click OK to add it to the list of objects.
- Right-click the new object entry, and then select Add Items from the contextual menu to open a Selection dialog that lists all the script items that can be added to an extended object.
- As a minimum, to enable the generation and reverse engineering of the object, you should select the following items:
- Create
- Drop
- AlterStatementList
- SqlAttrQuery
- SqlListQuery
- Click OK to add these script items to your object. You will need to enter values for each of these items. For more information, and guidance on syntax, see Common object items.
- Your object will now be available for generation and reverse engineering. You can also control the order in which this and the other objects will be generated. For more information, see GenerationOrder – customizing the order in which objects are generated.
Copyright (C) 2008. Sybase Inc. All rights reserved.
|
|