Oracle Unleashed- P13

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:50

0
38
lượt xem
2
download

Oracle Unleashed- P13

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Oracle Unleashed- P13: When I first started using Oracle many years ago, it was possible to know the database and the tools available. With the rash of recent releases of different options for the database and the spate of new tools, only people who wear their underpants over their trousers will be able to know everything there is to know about the Oracle products.

Chủ đề:
Lưu

Nội dung Text: Oracle Unleashed- P13

  1. 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.
  2. 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.
  3. 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: q XXX.TAB creates table code q XXX.VW creates view code q XXX.SS creates snapshot code q XXX.CON creates constraints code q 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. Changing Diagram Layout There are three types of diagram layout. (See Figures 27.15, 27.16, and 27.17.) q Vertical—all modules display vertically on the diagram. q Horizontal—all modules display horizontally, with each level displaying vertically. q 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.
  9. 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.
  10. The screen pops up a list of decomposable items (see Figure 27.19): q Application Preference q Domain q Table q 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.
  11. Generating the Calling Module If you accessed the Preference Navigator from the Module Data Diagrammer, you can generate the module by clicking the Generate icon, (refer to Figure 27.19). To learn more about generating a module, see Chapter 28, "Client Application Generation." Moving Through the Preferences Easily With so many preferences under so many decomposable items, it can be difficult to sift through all the preferences. There are some methods make using Preference Navigator less difficult. Decomposing and Recomposing To decompose a decomposable item, click the Collapse icon (refer to Figure 27.19). 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. Marking a Preference Suppose you are looking at a preference in application preferences. Then, you jump to a preference in table preferences, and you want to go back to the preference in application preferences. You either have to do a lot of scrolling back and forth on your screen, or you have to do a lot of decomposing and recomposing. To go back to a certain point fairly quickly, you can set a mark on it. To set a mark, click the Set Mark icon (refer to Figure 27.19). When you are ready to go back to that point, click the Go To Mark icon. You can only mark one item at a time. Searching for Preferences If you know the name of your preference or block of preferences, but you are not sure where they are on the preference hierarchy, you can find the preference or preference block with a search. Fill in the blank box to the right of the first icon on the icon bar. Then, click the Search Forward icon to look down the hierarchy for the search item, or click the Search Backward icon to look up the hierarchy for the search item (refer to Figure 27.19). Summary Once you have completed the analysis of your application, you are ready to move on to design work. You use the Database Design Wizard initially to set up default tables from the entities created during analysis. Next, you use the Data Diagrammer for fine-tuning the table definitions created and adding new table definitions where necessary. You use the Applications Design Wizard to set up default modules from the function definitions created during analysis. You use the Module Structure Diagrammer to link the module definitions together into a proper hierarchy for an application menu. Finally, you use the Preferences Navigator to set up the preferences so that you can move on to application generation. Previous Next TOC Home Page Page Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  12. Previous Next TOC Home Page Page q 28 r Client Application Generation s Generating Screens and Reports s Creating a Module Data Diagram s Selecting the Module s Summary Information s Table Usages s Relationships Between Tables s Column Usages s Editing Columns on a Screen s Editing Columns on a Report s Saving Your Diagram s Placing Screen Items on Different Windows or Canvases s Placing Report Items on Different Pages s Consolidating s Making a Diagram Easier to Follow s Using Colors, Fonts, and Line Width s Working with Large Diagrams s Using Navigate s Using Minimize Number of Pages s Zooming In and Out s Generating s Options When Generating the Screen s Options When Generating the Report s Summary 28 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 of the functions that these icons perform can also be found on the menu bar under Edit, View, Utilities, and Tools. Whether you want to use the icons or the menu is just a matter of usage style. For the most part, the descriptions in this chapter use the icons rather than the menu bar. Start the Module Data Diagrammer by clicking its icon and entering your user ID, password, and CASE application. Across the top of the screen, you will see a set of icons used to design a diagram (see Figure 28.1). Figure 28.1. The Module Data Diagrammer. Initially, you can create a new diagram by either choosing New from the File menu or pressing the New Diagram icon Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  13. (refer to Figure 28.1). When you choose this icon, or any icon from the Designer/2000 toolset, help is always available. You can see the help message appear in a balloon to the right of the icon when you move your cursor to an icon without pressing the mouse button. You can also get help by pressing the Context Help icon and then selecting anything on your screen (either an icon or an element). Finally, you can search for help on any topic from the Help menu pick. Generating Screens and Reports You can use the Module Data Diagrammer to generate screens and reports from Designer/2000. The module basis can come from a number of sources: q A function that generated a module when you used the Module Design Wizard q A module that is created in the Repository Object Navigator (RON) q A module that is created in the Module Data Diagrammer Creating a Module Data Diagram To create a module data diagram you need to take certain steps. You must create or select the module, add or modify the summary information, select the data usages, and generate the screen or report. Selecting the Module To select a module, select the Create Module icon. At this point, a list of module names appears. Select Report if you are creating a report or Screen if you are creating a screen and then select the module name from the list. If you are creating the module for the first time, click the Create Module button. Now fill in the module short name, 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 your reports with this tool, but they will not be generated from Designer/2000. Summary Information Initially, when you start your diagram you might want to fill in the summary information so that you can easily identify the diagram when it is printed. Under the File menu is a pick called Summary Information (see Figure 28.2). A window will pop up showing you all the choices you have for information to be included on your chart. Figure 28.2. The module data diagram summary information. Select any information you want to display on the diagram. If you want your name or a diagram title, you need to fill in these items. Table Usages Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  14. If you selected an already existing module that contains table usages, they will appear in a data diagrammer format. Parent/child relationships will display with the parent table on the top and the child on the bottom. Lookup relationships will display with the lookup to the right of the base table. If you are creating a new module or need to add new table usages to your module you need to select the Table icon (refer to Figure 28.1). Click the icon and select a table from the list of values. If you want to include more than one table without having to select the button each time, hold down the Shift key when you select the table button. When you are ready to move on to another activity, press another button on the icon bar. After you have added a table to the diagram you can edit its usage. Editing Table Usage for a Screen To edit table usage for a screen, double-click the item, and you can edit Table Details, Table Layout, and Table Text. Under the Table Details tab (see Figure 28.3), you can edit the allowable actions that are on-screen: insert, update, delete, query. These usages are the default for the entire table. Next, you can change the alias, block title, and comment. These will default from what was entered in the table definition. Figure 28.3. The Table Details tab for a screen. In the Table Layout tab (see Figure 28.4), you can select the number of rows to be displayed, the overflow style (whether the window should scroll, if only the field will scroll, or if the field will truncate), and the measurements of the canvas and window. Figure 28.4. The Table Layout tab for a screen. In the Table Text tab (see Figure 28.5) you can type in any WHERE clause, any notes, and any help text that you want for online help on the screen you are designing. The WHERE clause can trim down the selection from the table based on some rule defined for the module being generated. Figure 28.5. The Table Text tab for a screen. Editing Table Usage for a Report To edit table usage for a report, double-click the item. Under the Table Details tab (see Figure 28.6), you can edit the title and alias to be displayed, add comments, and choose the layout style. You can also choose the maximum number of records that can appear on a page. Figure 28.6. The Table Details tab for a report. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  15. Under the Table Text tab (see Figure 28.7), you can put in any additional notes and any WHERE clause. The WHERE clause can trim down the selection from the table based on some rule for the module being generated. Figure 28.7. The Table Text tab for a report. Wait to edit table usage until after you have added column usage. That way you only have to go into the edit screen once. Relationships Between Tables After you have added more than one table to a diagram you will want to display the relationships between the tables. Usually, when you add the second table in a relationship, the diagrammer will automatically add the relationship. Sometimes it does not. To add the relationship, select the Relationship icon (refer to Figure 28.1). Next, select one of the tables in the relationship, and then the other table in the relationship. The diagrammer will automatically place the relationship on the diagram. Sometimes the diagrammer will not accept the relationship as valid, even though the foreign key does exist in the table definition. The best way to handle this problem is to use Tools | Data Diagrammer off the menu bar. From the Data Diagrammer, find the table with which you are working and look at the foreign keys. Look up the foreign key you are trying to link to make sure it is valid. Now 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 usages to your module, you need to select the table to which you are adding column usages. Then select the Column icon (refer to Figure 28.1). Click the icon and select a column from the list of values. If you want to include more than one column without having to select the button each time, hold down the Ctrl key when you select the column button. If you want to select a set of columns, use the Shift key. If you want to select all the columns press the Select All button. On a table with many columns where you want to keep most, but not all of the columns, it is easier to press the Select All button, and then deselect the columns you do not want by pressing the Ctrl key at the same time you select the unwanted column. The columns will appear on your screen or report in the order they display on the table box. To change the order of columns, simply select the one to be moved and drag it up or down to the position in which you want it to be. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  16. After you have added the column usages you can edit them. Double-click the table or any of the columns listed. Double- clicking the table will bring up the edit window at the Table Details tab. Double-clicking the column will bring up the edit window at the Column Details tab, displaying the selected column. Editing Columns on a Screen Different tabs are available for modifying the look and feel of columns on a screen on the Detail Usages For A Screen dialog box: Usage, Column Details, Column Display, and Column Text. Editing Usages The Usages tab enables you to view and modify the usage of a column while you look at the usages of all the columns on the screen. (See Figure 28.8.) Figure 28.8. The column Usage tab for a screen. If you enter a usage that is not available for the table usage, the form will ignore the column usage. For example, if the employee table does not allow insert in your module, any insert usage on a column will be ignored when you run the Oracle Form that the module generator creates. Editing Column Detail The Column Detail tab enables you to edit usage, sort order, summary information, and hints. (See Figure 28.9.) Figure 28.9. The Column Detail tab for a screen. The Usage area is the same as the Usage tab; however, you can see only one column of the screen at a time. Order By refers to how the information is ordered in the selection from the database. For example, if you place a 1 in this box for the ID column, the data will order by the ID column. In the lower drop-down list you can select in which direction the information is ordered—either ascending or descending. In the Summaries box you list what type of summary calculation you want on a column. The Function box is a pop-up list of function types—sum or count. Type is a pop-up list of where you would want the break to be—the group. Source is a pop-up list of the columns available on the table; choose the one to be summarized. To select both the detail and summary of a column, select the column twice. In the second selection, fill in the summary information. Do the same thing to create a calculated field. The hint area is where you enter the hint for the user. When the screen is generated, this hint appears when the user enters the field on the screen. You can also enter a default value for the column at this point. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  17. Editing the Column Display The Column Display tab describes how columns will be displayed on the screen. (See Figure 28.10.) Figure 28.10. The Column Display tab for a screen. The display box contains the prompt that will appear on the screen. You can set the justification of the column—right, left, and so on—from the Justification pop-up list. You select the data type of the column—character, numeric, and so on—from the Display Datatype pop-up list. In the Display Format box you can enter a format mask. You enter the implementation item—whether the item is OLE or VBX—in the Implementation Item box. The width and height requirements can be entered for the column. If you make the width of the column the same as the width of the field, the generated box for the field will not be wide enough to fit a value that is as wide as the maximum width. Add an additional two characters to the width of a field; it will not scroll off the screen. If you enter three or four column heights, the screen will not generate. It will look as if it continues to process, but the screen will never return from generation. The Item Group box in the Column Display tab contains the name of the item group. If you want to display blocks of columns together, enter a name in the Item Group box. Then enter the prompt for the item group. The next time you want to add a column to this group, select the name from the Item Group pop-up list. Editing Column Text The Column Text tab (see Figure 28.11) contains any notes you might want to have on the column, any derivation expressions or formulas for extracting the columns, any PL/SQL needed to derive the column, any user text you might want to supply online, and any conditions for highlighting (a negative number, a yes answer to a question, any date beyond 90 days from the current date, and so on). Figure 28.11. The Column Text tab for a screen. Editing Columns on a Report Different tabs are available for modifying the look and feel of columns on a report on the Detail Usages For A Screen dialog box: Column Details, Column Display, and Column Text. Editing Column Details The Column Detail tab enables you to edit order by, argument, and summary information (see Figure 28.12). Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  18. Figure 28.12. The Column Detail tab for a report. Alias refers to a nickname you want to give the column. This action is useful if it is a user-defined, summary, or duplicate selection. If you do not define an alias, the report generator might bomb out because it is trying to create a SQL query with two references to a table with the same name. Click the Display box if the column contents will be displayed on the report. Order By refers to how the information is ordered in the selection from the database. For example if you place a 1 in this box, the data will order by this column first. In the lower drop-down list you can select the direction for the sort order: ascending or descending. Argument refers to any paring down you might want to do in the selection of the column. The Operator drop-down list is a list of argument types: =, >, like, and so on. You enter the comparison value in the Name box. In the Summaries box, you would list the type of summary calculation you want on a column. The Function box is a drop-down list of function types, such as sum, standard deviation, and so on. Type is a pop-up list of where you would want the break to be, such as in the item, the page, or the report. Source is a pop-up list of the columns available on the table; choose the one to be summarized. To select both the detail and summary of a column, select Column Usage twice. The second time you select it, fill in the summary information. Repeat this step to create a calculated field. Editing the Column Display for a Report If you select the Column Display tab (see Figure 28.13), you can edit the display and grouping characteristics. These will default from whatever was entered in the attribute definition and generated as a column, or whatever was added or edited in the column definition. Figure 28.13. The Column Display tab for a report. The Display box contains the prompt that will appear on the header of each breakpoint. In the Justification drop-down list, set the justification of the column—right, left, and so on. Select the data type of the columns—character, numeric, and so on—from the Display Datatype drop-down list. Select whether the column should be cut off or wrap on a page by selecting the option from the Wrap drop-down list. Finally, in the Width and Height boxes, select the width and height requirements for the column. If you enter too many varying column heights, the report will not generate. It will look as if it continues to process, but the tool will never return from generation. The Item Group box contains the name of the item group. If you want to display blocks of columns together, enter a name in the Item Group box. Then, enter the prompt for the item group. The next time you want to add a column to this group, select the name from the Item Group Name drop-down list. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  19. Editing Column Text The Column Text tab (see Figure 28.14) contains any notes you might want to include on the column, any derivation expressions or formulas for extracting the columns, and any conditions for highlighting (a negative number, a yes answer to a question, any date beyond 90 days from the current date, and so on.) Figure 28.14. The Column Text tab for a report. Saving Your Diagram When you are ready to save the diagram select File | Save from the menu bar. You can also save your work by pressing the Save icon (refer to Figure 28.1). At this point you can name your diagram. 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. Placing Screen Items on Different Windows or Canvases Sometimes you will want some of your data to display on a different window or canvas than other data. For example, you might have employee personal information on one window and their address on the next window. To move an item to a different window, select the New Window icon (refer to Figure 28.1). Place the cursor on the diagram and a new window will appear. You can add tables to this window or move existing tables from one window to another. You might also want to place a table, such as a lookup table, on a pop-up list. To add a pop-up list, select the Pop List icon (refer to Figure 28.1). Drag the cursor around the base table and the lookup that will be the pop-up. Placing Report Items on Different Pages Sometimes you will want some of your data to print on a different page than other data. For example, you might want to print summary information first, and then detail information. To move an item to a different page, select the New Page/ Report icon (refer to Figure 28.1). Place the cursor on the diagram and a new page will appear. You can add tables to this page or move existing tables from one page to another. Consolidating You can make changes to a table or its relationships in either the Data Diagrammer or RON. The changes will not be reflected on any module data diagrams that use the same tables. There might be a reason for the user to keep the changes off—to reflect an earlier point in time or reflect the business opinions of another department. However, it is possible to take into account the changes from other users and consolidate them into the current diagram. To do so, you must choose Edit | Consolidate from the menu bar. At this point, you can choose whether to consolidate a specific entity, relationship, or the entire diagram. If new tables were added to a module definition in RON they will not be on the diagram. To add these tables or relationships to the diagram, select Edit | Include New. Any new tables or relationships will be added to the diagram. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  20. If you do not consolidate an element that has changed, you cannot edit the module. Making a Diagram Easier to Follow There are several ways in which you can make the diagram easier for the customer to follow, as explained in the following sections. Using Colors, Fonts, and Line Width You can change the colors of tables and relationships, the fonts of words, and the line width of table outlines and relationships. By changing these items you can make the diagram more readable and more intelligent. For example, you can fill in with blue all lookup tables. The diagrammer has default colors set up for the base table, lookup table, page, and so on. You change the defaults under Edit | Preferences off the menu bar. The colors on the diagram will show up only if you have a color printer. However, if you are using a black-and- white printer, colors will show up grayed, so you can use one color differentiation. You can change the entire diagram or just a specific entity, relationship, or combination. To change the entire diagram choose Edit | Select all off the menu bar. To select one or more entities or relationships, select one and hold down the Ctrl key until all the items are selected. To change the line width, select the Line Width icon (refer to Figure 28.1). 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 entities, choose the Fill Color icon. Choose a color from the items listed. To change the font of any text selected, choose the Text icon. You can change the font, the style of the font, and the size of text. Working with Large Diagrams When you work with large diagrams, keeping track of where you are on the diagram can become difficult, and the diagram can take up many pages when it prints. There are simple ways to deal with these irritations. Using Navigate To move from table to table on the diagram, use Edit | Navigate on the menu bar and then select a table. The cursor will select the table you request, and the focus of the screen will include the table requested. Using Minimize Number of Pages Often, when the diagram is filled with many entities, it becomes very large, sprawling horizontally or vertically. As a result, many blank pages can fill the borders of the diagram. You can reposition the diagram to use the least amount of pages by using the Minimize Number of Pages icon. Pressing this icon will reposition the entire diagram so that the least number of pages are used. Zooming In and Out Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Đồng bộ tài khoản