Oracle Unleashed- P13

50 191 0
Oracle Unleashed- P13

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

item in the primary key. Hold down the Ctrl key and select any other items in the key. Click the Primary Key (refer to Figure 27.4). Saving the Diagram To save the diagram, click the Save icon (refer to Figure 27.4). You can name your diagram anything you like; it probably makes sense to name it something related to the top menu level. It is important to save often. The Oracle client/server tools use a large amount of memory and can sometimes cause a general protection fault on the PC. Saving often decreases the risk of losing any unsaved work. Multiple Diagrams Often, you could have multiple diagrams for one application in Designer 2000. For example, a business might have an accounting department and a payroll department. Both departments could have separate diagrams, and a third diagram might depict all the departments in the business. Consolidating You can make changes to a table or its foreign keys in either the Data Diagrammer or RON. The changes are not reflected on other diagrams that use the same tables. The user might have a reason to keep the changes off—for example, to reflect an earlier point in time or the business opinions of another department. It is possible to take into account the changes from other users and consolidate them into the current diagram. To do so, choose Edit | Consolidate from the menu bar. At this point, you can choose whether to consolidate a specific table, foreign key, or the entire diagram. If you do not consolidate an element that has changed, you cannot edit it. If foreign keys have been added to tables that are on your diagram, you can add them to your diagram by choosing Edit | Include | Relationship. All the relationships missing from your diagram appear on a list, and you can select the ones you want to add to your diagram. Making a Diagram Easier to Follow There are several ways you can make the diagram easier for the customer to follow. You can change the layout to make the table layout easier to follow, and you can change the colors and line widths. Autolayout When you add tables to a diagram, you place them where they seem to fit, and as you add more tables, the layout might become crowded. When the diagram starts to look ugly, it is time to use the Autolayout icon (refer to Figure 27.4). When you click the icon, the tables and foreign keys shift around for readability. If you don't like the way the computer reset the layout, you can click the Autolayout icon again. You can continue to click the icon until you are happy with the outcome. You can go to the last autolayout using the Revert Layout button. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Autolayout for a Specific Area Sometimes, you add a number of new tables to a specific area, and the layout of these tables is difficult to follow. To reposition them, you need to select just those tables and click the Autolayout button. To reposition the tables to another area on the diagram, select the tables and choose Utilities | Autolayout to New Area. Select where you want to reposition the tables and drag an area large enough to fit them. When you release the mouse, the tables are repositioned in the new area. Using Colors, Fonts, and Line Width It is possible to change the colors of tables and foreign keys, the fonts of words, and the line width of table outlines and foreign keys. By changing these items, you can make the diagram more readable and add intelligence. For example, you can fill in all payroll tables with red. The colors on the diagram only show up if you have a color printer; however, if you use a black and white printer, colors show up grayed so you can use the various shades of gray for differentiation. You can change all of the diagram or just one specific table, foreign key, or combination. To change the entire diagram, choose Edit | Select All. To select one or more tables or foreign keys, select one and hold down the Ctrl key while you select all the items. To change the line width, select the Line Width icon (refer to Figure 27.4). Choose a line width from the items listed. To change the line color, choose the Line Color icon. Choose a line color from the colors listed. To change the fill color of tables, choose the Fill Color icon. Choose a color from the items listed. To change the font of any selected text, choose the Text icon. You can change the font, the font style, and the text size. You can also change the preferences for specific types of items. By choosing Edit | Preferences, you can set all tables to be one color, all views to be another color, and all snapshots to be yet another color. Working with Large Diagrams When you work with large diagrams, it can become difficult to keep track of where you are on the diagram. The diagram might take up many pages when printing. There are simple ways to deal with these irritations. Using Navigate Select Edit | Navigate and choose either a table, view, snapshot, or foreign key. The cursor selects the requested item, and the focus of the screen changes to include the item. Using Minimize Number of Pages When a diagram is filled with many tables, it often becomes very large, sprawling horizontally or vertically. As a result, many blank pages might fill the borders of the diagram. You can reposition the diagram to use the least number of pages by using the Minimize Number of Pages icon. Clicking this icon repositions the entire diagram so that it uses the least number of pages. Zooming In and Out Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. You can zoom in and out of your picture to get a better idea of how an area of the picture looks or how the entire picture looks. The magnifying glass icons enable you to perform this function. Use the Normal Size icon to return to normal size (refer to Figure 27.4). Use the Enlarge icon to enlarge. Use the Shrink icon to shrink. Generate the Tables Again If you are not satisfied with the generation of any tables or there are new entities you want to generate as tables, you can do so from the diagrammer. Click the Database Design Wizard icon to regenerate or generate any tables from entities (refer to Figure 27.4). For more information on the Database Design Wizard, see the "Database Design Wizard" section earlier in this chapter. Retrofit If you have made changes to a table that you want to see reflected in the entity the table was generated from, click the Table Entity Retrofit icon (refer to Figure 27.4). You can choose what tables to retrofit, what entity they return to, and what columns and constraints should be passed back. Generating DDL Once you are satisfied with what you have created in the Data Diagrammer, you can generate the DDL for creating the tables, views, snapshots, and constraints on your database. Make sure you save the diagram before generating. Click the Generate DDL icon (refer to Figure 27.4). Select what tables, views, snapshots, and constraints you want to generate. The scripts to create the items are created at this point. The scripts receive the following names: ● XXX.TAB creates table code ● XXX.VW creates view code ● XXX.SS creates snapshot code ● XXX.CON creates constraints code ● XXX.IND creates index code The XXX is defined as the short name for your table. You can examine the scripts and run them right from the generator. The DDL Generator also generates DBA information such as triggers, tablespaces, clusters, and so on. The Application Design Wizard You use the Application Design Wizard to generate modules and menus from functions. Before running the tool, you should make sure that your functions are properly defined. To check them, run the Matrix Diagrammer to ensure the functions are covering all the CRUD for the entities to be generated. For more information on running these reports, see Chapter 24, "Repository Administration." Finally, the Database Design Wizard should have already generated the table definitions so that the table usages are recognized by the Application Design Wizard. Starting the Application Design Wizard You can invoke the Application Design Wizard from either the Repository Object Navigator, the Function Hierarchy Diagrammer, or the Dataflow Diagrammer. Select Utilities | Database Design Wizard. The Application Design Wizard selection screen appears (see Figure 27.9). You can select the start function level, the module prefix, the language options, the merge granularity, and whether to generate modules or menus. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Figure 27.9. The Application Design Wizard. You can enter any language options you want for the module options; however, the module generator only generates Oracle Forms, Oracle Reports, and PL/SQL. Any other languages you specify are for documentation purposes only. Merge granularity refers to the level of information coming from the functions. The transfer can be at the attribute level or only the entity level. Once you click the Generate button, the system generates the modules from the candidate functions. You are prompted when the generation is complete. Next, you can click the Show Results button to see a Notepad file showing what functions were generated into modules. The module names take on the following format: the prefix (if any was given) 0010 (incrementing by tens from the initial elementary function through the last function). You can edit the name in RON. To generate module names in system blocks, choose the parent at the top of each system (payroll, accounting, and so on) and give it a unique prefix. Functions that are elementary generate as screen, report, or manual operation modules (if there is no entity usage). Functions that are not elementary generate as menu modules. To regenerate a module, you must first delete it. The Module Structure Diagrammer You use the Module Structure Diagrammer to set up a hierarchy of modules that are generated into a menu. Starting Up Start the Module Structure Diagrammer by clicking its icon and entering your user ID, password, and application. Across the top of the screen, you see a set of icons used for designing a diagram (see Figure 27.10). Figure 27.10. The Module Structure Diagrammer. A menu consists of different menu levels and actual screens, reports, procedures, and utilities. You can start your menu at the top level and work down, or you can select groups of modules that belong together and then link them together under menu points. Summary Information Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. You can enter any summary information you want to display on the top of the diagram. To edit the summary information, choose File | Summary Information (see Figure 27.11). Figure 27.11. The Summary screen. Adding Items You can either use existing modules in your diagram or create new modules. If you forgot a module or realize when you are creating your Module Structure Diagram that you should include a new module, you can add one. Otherwise, you are better off creating your module in the Module Data Diagrammer. For more information on using the Module Data Diagrammer, see Chapter 28, "Client Application Generation." Sometimes, a module is similar to an existing module. Rather than create a new module, you can copy an old one and give the copy a new name. To copy a module, click the Copy Module icon, which is the fifth icon from the right on the bottom bar. Select the module to copy and then drag the cursor to the spot for the copied module. You are prompted to give the name and description information. To include an existing module on the diagram, choose Edit | Include Network. A list of modules appears. You can pare down the list by selecting a type or by entering a string contained in the module's short name. Once you choose an item, it is added to the diagram. To select multiple modules from the include list, hold down the Ctrl key and click the modules you require or select a block of modules while holding down the Shift key. If you choose a large number, your diagram could become too difficult to follow for the initial editing, so keep this in mind when making your selection. You can also add a new module to the diagram. Decide what kind of item you want to put on the diagram and select its icon: Menu, Form, Report, PL/SQL, or Utility (refer to Figure 27.10). Once you place the cursor on the diagram, you are prompted for a short name, a description, the module type, and the language the module will be generated in. Editing a Module If you want to edit information about any of the modules, double-click the module on the diagram. You then have a set of tabs for defining module information. The first tab, Module, defines general module information (see Figure 27.12). Figure 27.12. The Module tab. The Implements tab refers to what functions or business units are implemented by the module. If the module is new or the module implements additional functions, you can add these functions here. The Parameters tab lists the parameters needed to run this module, their data types, and whether the parameters are input, output, or both. The Access tab lists the users or groups that can access the menu. Groups are set up in business units to determine what roles can run certain functions. When the functions create modules, these groups get passed along to the modules. You can change or add these groups here. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. For Client Tools Only Certain tabs are only available to client modules—or screens, reports, and menus (see Figure 27.13). The Client Details tab contains information specific to generating a client tool. Figure 27.13. The Client Details tab. For Server Tools Only If you are generating a utility or PL/SQL, you have a Server Details tab (see Figure 27.14). The server details list items specific for generating a function or procedure—type, name, database, return type, and so on. Figure 27.14. The Server Details tab. The Program Data tab lists any defined variables that the SQL uses, such as character fields. The Data Structure tab lists any cursors or virtual tables that the SQL creates and uses. You can copy a structure from a table structure. Adding Hierarchy Once you have added a number of modules to your diagram, you can start to place them under a menu level. To do so, click the Make Slave icon (refer to Figure 27.10). Select the module to be at the slave level. Drag the cursor to the parent module. The slave is placed under the parent. If you want to create more than one slave without selecting the button each time, hold down the Shift key when you click the Make Slave button. When you are ready to move on to another activity, click another button on the icon bar. Saving the Diagram To save the diagram, click the Save icon (refer to Figure 27.10). You can name your diagram anything you want; it probably makes sense to name it something related to the top menu level. It is important to save often. The Oracle client/server tools use a large amount of memory and can sometimes cause a general protection fault on the PC. Saving often decreases the risk of losing any unsaved work. Modifying a Diagram Once you've saved the initial diagram, you might want to move items around to make more sense structurally. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Resequencing Modules Once you have created your diagram, you might want to resequence certain modules under the parent. To do so, click the Reposition icon (refer to Figure 27.10). Select the module you want to resequence. Drag it into the module you want to follow it and then release the button. When you're making a module the last module, there is no room on the menu for it at the end. Instead, make it the second-to-last module; then, move the last module in front of it. Moving a Module Sometimes, it makes sense to move a module from one area of the diagram to another. To reparent a module, click the Relocate icon (refer to Figure 27.10). Select the module you want to move. Drag the cursor to the new parent and release the button or drag it to empty space to make it an orphan. Delete a Module and its Slave Modules If you delete a parent module from the diagram, the slave modules hook up to the parent above their original parent. To delete the entire chain, use the Delete Association icon (refer to Figure 27.10). Click the icon and select the parent module you want to delete. The module and all its slave modules are deleted. Consolidating You can make changes to a module's definition or its point in the structure in either the Module Structure Diagrammer or RON. The changes are not reflected on other diagrams that use the same modules. You might have a reason to keep the changes off—for example, to reflect an earlier point in time or the business opinions of another department. It is possible to take into account the changes from other users and consolidate them into the current diagram. To do so, choose Edit | Consolidate. At this point, you can choose whether to consolidate a specific module or the entire diagram. If you do not consolidate an element that has changed, you cannot edit it. Making Diagrams Easier to Follow When you work with large diagrams, it might get difficult to keep track of where you are on the diagram. The diagram can take up many pages when printing. There are simple ways to deal with these irritations. Decompose and Recompose As you add slaves to parent modules, they make the diagram larger and larger. Sometimes, you want to look at the diagram at a higher level and ignore the lower level. If a parent has a minus sign to the right of it, you can recompose it. If a parent has a plus sign to the right of it, you can decompose it in order to see more modules. To decompose an item, click the Collapse icon (refer to Figure 27.10). To decompose an item to its lowest level, click the Collapse All icon. To recompose a decomposed item, click the Expand icon. To recompose an item and all the items below it, click the Expand All icon. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Changing Diagram Layout There are three types of diagram layout. (See Figures 27.15, 27.16, and 27.17.) ● Vertical—all modules display vertically on the diagram. ● Horizontal—all modules display horizontally, with each level displaying vertically. ● Hybrid—a combination of vertical and horizontal that seems the most appealing based on the structure. Figure 27.15. A vertical layout for a module structure. Figure 27.16. A horizontal layout for a module structure. Figure 27.17. A hybrid layout for a module structure. To choose a specific layout type, select the icon: Horizontal, Vertical, or Hybrid (refer to Figure 27.10). You can also choose a structure for an area of the diagram from a parent down. Select the parent of the area you want to restructure. Then, select the Horizontal icon or the Vertical icon. Using Colors, Fonts, and Line Width You can change the colors of module, the fonts of words, and the line width of module outlines and breakdown lines. By changing these items, you make the diagram more readable and add intelligence. For example, you can fill in all screen modules with blue. The colors on the diagram only show up if you have a color printer; however, if you use a black and white printer, colors show up grayed, and you can use the various shades for differentiation. You can change all of the diagram or just a specific module or connection line combination. To change the entire diagram, choose Edit | Select All. To select one or more modules or connection lines, select one and hold down the Ctrl key while you select all the items. To change the line width, select the Line Width icon (refer to Figure 27.10). Choose a line width from the items listed. To change the line color, choose the Line Color icon. Choose a line color from the colors listed. To change the fill color of modules, choose the Fill Color icon. Choose a color from the items listed. To change the font of any selected text, choose the Text icon. You can change the font, the font style, and the text size. You can change the preferences of your diagram so that screens are always one color and menus always another color and so on. To make these global changes, select Edit | Preferences (see Figure 27.18). Figure 27.18. The Diagram Preferences screen. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Working with Large Diagrams When you work with large diagrams, it can be difficult to keep track of where you are on the diagram. The diagram can take up many pages when printing. There are simple ways to deal with these irritations. Using Minimize Number of Pages When you fill a diagram with many modules, it often becomes very large, sprawling horizontally or vertically. As a result, many blank pages might fill the borders of the diagram. You can reposition the diagram to use the least number of pages by clicking the Minimize Number of Pages icon. Clicking this icon repositions the entire diagram so that it uses the least number of pages. Zooming In and Out You can zoom in and out of your diagram to get a better idea of how an area of the diagram looks or how the entire diagram looks. The magnifying glass icons enable you to perform this function. Use the Normal Size icon to return to normal size (refer to Figure 27.10). Use the Enlarge icon to enlarge. Use the Shrink icon to shrink. Ready to Generate Once you are satisfied with your diagram, you are ready to generate. Click the Generate icon (refer to Figure 27.10). You see the generate screen. For more information on using the generator, see Chapter 28, "Client Application Generation." If your diagram starts at a menu level, the generator generates a menu. You need to link this menu to an Oracle form in order to use the menu. The Preference Navigator You use the Preference Navigator to set up the standards for generating screens and reports for an application. You can start it from its own icon or from the Repository Object Navigator or the Module Data Diagrammer via the Tools | Preference Navigator option. Initially, you start from RON or the icon itself to set up the global preferences for the entire application. When you are generating the modules, it is good to start from the Module Data Diagrammer so that you can set specific preferences for a specific module as you generate. That way, you can perform what-if scenarios with the preferences and see the results as you generate. Starting Up After you decide where to start the Preference Navigator, start it up. If you are starting from the icon, you need to enter your user ID, password, and application. If you are starting from another tool, the tool passes this information. The first thing you must do is enter whether you are setting preferences for Oracle Forms, Oracle Reports, or Visual Basic. You can set preferences for Visual Basic, but you cannot generate in Visual Basic at this time. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. The screen pops up a list of decomposable items (see Figure 27.19): ● Application Preference ● Domain ● Table ● Module Figure 27.19. The Preference Navigator. You know these items are decomposable because they each have a plus sign to the left of its name. You can set preferences at any one of these levels. Application Level Preferences at the application level include things such as commenting, coding style, layout, and so on. For a screen, layout includes things such as buttons, canvases, or check boxes. For a report, layout includes things such as frame style, box style, or field format. Many of the preferences for both screens and reports are the same. If you click the plus sign to the left of Application Preferences, it decomposes again. Once you pick a preference summary level such as button layout, it decomposes again into the specific preferences. These preferences have minus signs to the left of them because they are at the lowest composition level. When you select a preference from the list, the meaning of the preference appears on the bottom of the screen. For example, BUTMAX is the maximum number of buttons within a radio group. The properties window displays the current value for the preference. You can change it to whatever you choose. By setting the preferences at the application level, all your reports can have the same look and feel throughout the entire application. Working Below the Application Level You can also set preferences at levels below the application level for any domain, table, or module. For example, assume you set the BUTMAX preference at the application level to 6, but you want it to be 3 on a specific screen. Select that module from the module list, go to the button layout preferences, and change the BUTMAX preference to 3. When that module generates, the maximum number of buttons within a radio group will be 3. If you later decide to switch the preference back to the application level, just click the Remove Properties icon, the fifth from the left on the icon bar. Saving Your Preferences When you are satisfied that you set your preferences to a point where you want to generate, click the Save icon, the first icon from the left. It is important to save often. The Oracle client/server tools use a large amount of memory and can sometimes cause a general protection fault on the PC. Saving often decreases the risk of losing any unsaved work. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... description, language, and module type Designer/2000 generates only the new reporting tool ORACLE Reports and not SQL*Reportwriter You can choose SQL*Reportwriter if you are in fact writing your reports with this tool, but they will not be generated from Designer/2000 Designer/2000 generates only the new screen painting tool ORACLE Forms and not SQL*Forms You can choose SQL*Forms if you are in fact writing... completed, or when new objects have been added Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark to the application system The generator is intended for Oracle7 DDL generation, but can also generate some Oracle V6 and ANSI compatible DDL scripts See the Designer/2000 documentation, on-line help, and release notes for specific generator capabilities and restrictions as these may... check constraints creation can be turned on or off The column comments places any comments on a column's repository definition into the database's data dictionary The Oracle 7.1 syntax option tells the generator to create its DDL scripts in Oracle 7.1 format Finally, the comment syntax is the syntax used by the generator to comment the DDL script files Generation and its Output Once a database and object(s)... counterpart, the Report Generator, rather than the DDL Generator Under the product-flavor list box, one of the following types of reports can be reverse engineered: q Oracle Reports version 2.5 q SQL*ReportWriter 1.1 q SQL*Plus Reports q SQL*Reports (RPT) q Oracle Pre-compiler (PRO*C) The location list box will default to File, but can be changed to Database if the form is stored in the database The destination... charts such as my old spreadsheets; can my Oracle form do this?" Looking through Designer/2000, you see the Server Generation tools, the Form Generator, and the Report Generator, but no Graphics Generator There is not even a menu, button, or toolbar available on any of the Designer/2000 diagrammers; however, you know you've seen examples of graphs being used in Oracle Remember what the Designer/2000 tool... Critical Success Factors Data Items Databases Databases (ANSI) Databases (Oracle) Datastores Diagrams Documents Domains Entities Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark Events Externals Files Groups Key Performance Indicators Languages Locations Modules Named Preference Sets Nodes Objectives Oracle Database Users Problems Relations Rollback Segments Sequences Snapshots... Client Application Generation Client application generation is the creation of screens and reports You perform client application generation during the design and build phases of the life cycle of an Oracle project In this chapter, you will learn the Module Data Diagrammer tool, which is used to generate both screens and reports On the top of the screen are a pull-down menu and a toolbar of icons All... exit the diagrammer Try to create the relationship again If it still does not work, delete the lookup table from the diagram and try to add it again If you cannot get the relationship to display, call Oracle Support Column Usages If you select an already existing module that contains column usages, they will appear in a data diagrammer format If you are creating a new module or need to add new column... Here is where either the cross reference report or the alter database DDL generator are selected Figure 29.5 Reconcile Repository Object Definitions dialog box The database list box will identify the Oracle database that the objects are to be reconciled in The database must be predefined in the repository The object owner identifies the user on the physical database that owns the objects being reconciled... Engineer Form dialog box This utility is more like the Form Generator than the DDL Generator Under the product-flavor list box, the only of the following type of form that can be reverse engineered is Oracle Forms version 4.5 Since future releases of the Forms Generator utility will be able to generate Visual Basic forms, it is likely that Visual Basic forms will be included in reverse engineering The . for the module options; however, the module generator only generates Oracle Forms, Oracle Reports, and PL/SQL. Any other languages you specify are for documentation. first thing you must do is enter whether you are setting preferences for Oracle Forms, Oracle Reports, or Visual Basic. You can set preferences for Visual Basic,

Ngày đăng: 07/11/2013, 20:15

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan