16.6.5.1. Modeling Menus

Some menu options are not available in the OSS version of this application, and are only available in the Standard Edition. This is indicated where applicable.

16.6.5.1.1. The File Menu

Use this menu item to open a project, begin a new project, or save a project. Choosing New Model opens the default schema, mydb. Choosing Open Model opens a file dialog box with the default file type set to MySQL Workbench Models (MWB). To display a list of recently opened MWB files, choose the Open Recent menu option. The keyboard command to create a new project is Ctrl N and the command to open an existing project is Ctrl O.

To close the currently active MySQL Model or EER Diagram tab, use the Close Tab option. You can also do this from the keyboard by pressing Ctrl W. To reopen the MySQL Model tab, see Section 16.6.5.1.3, “The View Menu”. To reopen an EER Diagram tab, double-click the EER Diagram icon in the EER Diagrams section of the MySQL Model page.

Use the Save Model or Save Model As menu options to save a model. When you save a model its name appears in the title bar of the application. If you have made changes to a project and have not saved those changes, an asterisk appears in the title bar following the model name. When you save a model it is saved as a MySQL Workbench file with the extension mwb.

Use the Import menu option to import a MySQL data definition (DDL) script file, one created by issuing the command mysqldump --no-data, for example. If the script does not contain a CREATE db_name; statement, the schema objects will be copied to the default schema, mydb. If the script creates a database, a new tab bearing the database name is added to the Physical Schemata section of the MySQL Model page. If the script contains data, it will be ignored. Importing a DDL script is discussed in detail in Section 16.6.7.9.1, “Reverse Engineering Using a Create Script”.

Under the Import menu option you can also import DBDesigner4 files.

There are variety of options under the Export menu item. You may generate the SQL statements necessary to create a new database or alter an existing one. These menu items are discussed in detail in Section 16.6.7.10.1, “Forward Engineering Using SQL Scripts”.

Using the Export menu item you can also export an EER diagram as a PNG, SVG, PDF or Postscript file. For an example of a PNG file see Figure 16.82, “The sakila EER Diagram”.

The Page Setup menu item enables you to set the paper size, orientation and margins for printing purposes.

The print options are only enabled if the EER Diagrams tab is selected. You have the choice of printing your model directly to your printer, printing it as a PDF file, or creating a PostScript file. For more information see Section 16.6.9, “Printing”.

Note

The printing options are only available in commercial versions of MySQL Workbench.

Use the Document Properties menu option to set the following properties of your project:

  • Name: Defaults to MySQL Model

  • Version: The project version number.

  • Author: The project author.

  • Project: The project name.

  • Created: Not editable, determined by the MWB file attributes.

  • Last Changed: Not editable, determined by the MWB file attributes.

  • Description: A description of your project.

16.6.5.1.2. The Edit Menu

Under this menu item find the options for cutting, copying, and pasting. These actions can also be performed using the Ctrl X, Ctrl C, and Ctrl V key combinations. Undo a deletion using the Undo Delete 'object_name' option. The Ctrl Z key combination can also be used to undo an operation. It is also possible to carry out a Redo operation using either the menu item, or the key combination Ctrl Y.

Also find a Delete 'object_name' menu item for removing the currently selected object. The text description for this menu item changes to reflect the name of the currently selected object. The keyboard command for this action is Ctrl Delete. You can also right click an object and choose the delete option from the pop-up menu.

The Delete 'object_name' menu item behaves differently depending upon circumstances. For instance, if an EER Diagram is active and a table on the canvas is the currently selected object, a dialog box may open asking whether you want to remove the table from the canvas only or from the database as well. For setting the default behavior when deleting from an EER Diagram see Section 16.4.4.4, “The Model Tab”.

Warning

If the MySQL Model page is active, the selected object will be deleted from the catalog and there will be no confirmation dialog box.

Choose Edit Selected to edit the currently selected object. You can also perform edits in a new window by selecting Edit Selected in New Window. The keyboard shortcut for Edit Selected is Ctrl E and Ctrl Shift E for Edit Selected in New Window.

The Select option has the following submenus:

  • Select All (Keyboard shortcut, Ctrl A): Select all the objects on the active EER diagram.

  • Similar Figures (Objects of the same type): Use this option to find objects similar to the currently selected object.

  • Connected Figures: Use this option to find all the objects connected to the currently selected object.

These menu items are only active when an EER Diagram tab is selected. The Similar Figures and the Connected Figures menu options are disabled if no object is currently selected on an EER diagram.

When multiple objects have been selected using one of these menu options, you can navigate between selected items by choosing the Go to Next Selected or Go to previous Selected menu options.

Selecting items changes some of the Edit menu options. If only one object is selected, that object's name appears after the Cut, Copy and Delete menu options. If more than one object is selected, these menu items show the number of objects selected.

16.6.5.1.2.1. Find Dialog Window

The Find menu item displays a sub-menu with the following menu items:

  • Find: Takes you to the toolbar search box. You can look for objects in the current view. Find can locate objects in the Model view, the EER Diagram view, and also in the Catalog palette.

  • Find Next: Finds the next occurrence of the object.

  • Find Previous: Finds the previous occurrence of the object.

  • Search and Replace: Displays the Search and Replace dialog. This is currently only for use with the SQL Editor, to allow you to quickly search and replace script code items.

The Standard Edition of MySQL Workbench includes a more advanced Find facility:

Figure 16.39. The Find Window

The find window

You can search the following locations:

  • Entire Model: Search the entire model.

  • Current View: Search the current view only. This may be the MySQL Model page.

  • All Views: Search the MySQL Model Page and all EER diagrams.

  • Database Objects: Search database objects only.

  • Selected Figures: Search the currently selected objects. This feature only works for EER diagrams.

Enter the text you wish to search for in the Find Text drop down list box. You may also select any or all of the following check boxes:

  • Match Case

  • Whole Word

  • Use Regular Expression

  • Search in Comments

  • Search in SQL for Views, SPs etc.

Any text you enter into the Find Text drop down list box is retained for the duration of your session. Use the Next or Previous buttons to find occurrences of your search criterion.

Clicking the Find All button opens a Find Results window anchored at the bottom of the application. If you wish, you may undock this window as you would any other.

Use this window to navigate to objects. For example, double clicking the Description of an object located on an EER diagram navigates to the specific diagram and selects the object. Notice that the properties of the object are displayed in the Properties palette.

The Find dialog window can also be opened using the Ctrl F key combination. Use Ctrl G to find the next occurrence and Ctrl Shift G to find a previous occurrence. Close the Find dialog window by clicking the x in the top right corner or by pressing the Esc key.

16.6.5.1.2.2. Workbench Preferences

This menu option enables you to set global preferences for the MySQL Workbench application.

For further information see Section 16.4.4, “Workbench Preferences”.

16.6.5.1.3. The View Menu

The Options available under this menu item are:

  • Home: Selects the Home screen.

  • Windows

    • Model Navigator: Open the Model Navigator palette

    • Catalog: Open the Catalog palette

    • Layers: Open the Layers palette

    • User Datatypes: Open the User Datatypes palette

    • Object description: Open the Description palette

    • Object properties: Open the Properties palette

    • Undo History: Open the History palette

    These menu options provide a means for opening the windows associated with these options.

  • Advanced

    • Output Window: Use this option to display the console output. The keyboard shortcut for this menu item is Ctrl F2.

    • GRT Shell: Open the GRT shell. For more information about the GRT shell see Section 16.8.5, “The Workbench Scripting Shell”. The keyboard shortcut for opening the GRT shell is Ctrl F3.

  • Reset Window Layout: Reset all windows to their default layout.

  • Zoom 100%: The default level of detail of an EER diagram.

  • Zoom In: Zoom in on an EER diagram.

  • Zoom Out: Zoom out from an EER diagram.

    The ability to zoom in on an EER diagram is also available using the slider tool in the Model Navigator palette. See Section 16.6.5.8, “The Model Navigator Panel”.

  • Set Marker: Use this option to bookmark an object. From the keyboard select the object you wish to bookmark and use the key combination Ctrl Shift and the number of the marker (1 through 9). You may create up to nine markers.

  • Go To Marker: Return to a marker. From the keyboard use the Ctrl key and the number of the marker.

16.6.5.1.4. The Arrange Menu

The Arrange menu option applies only to objects on an EER diagram canvas and is only visible if an EER diagram view is active. The options under this menu item are as follows:

  • Align to Grid: Align items on the canvas to the grid lines.

  • Bring to Front: Use this option to bring objects to the foreground.

  • Send to Back: Use this option to move objects to the background.

  • Center Diagram Contents: Use this option to center objects on the canvas.

  • Autolayout: Use this option to automatically arrange objects on the canvas.

  • Reset Object Size: This option expands an object on an EER diagram. For example, if a table has a long column name that is not fully displayed, using this menu option will expand the table making the column visible. This menu item is not enabled until an object is selected.

  • Expand All: Use this option to expand all objects on an EER diagram. This option will display a table's columns if the object notation supports expansion. Some object notations, such as Classic, do not allow for expansion or contraction. Indexes will not automatically be expanded unless they were previously expanded and have been collapsed using the Collapse All menu option.

  • Collapse All: Undo the operation performed by Expand All.

16.6.5.1.5. The Model Menu

The menu options available under the Model menu item are as follows:

16.6.5.1.5.1. The DBDoc Model Reporting Dialog Window (Commercial Version)

This dialog window is found by navigating to the Model menu item and choosing the DBDoc - Model Reporting ... option.

Note

The DBDoc - Model Reporting ... option is not available in the MySQL Workbench OSS version.

Use this dialog window to set the options for creating documentation of your database models.

You can about this menu item in more detail in the following section The DBDoc Model Reporting Dialog Window.

16.6.5.1.5.2. The Validation Menu Options (Commercial Version)

Under the Model menu option there are two validation options, Validation and Validation (MySQL). Use these options for general validation and MySQL-specific validation of the objects and relationships defined in your model.

Note

These options are not available in the MySQL Workbench OSS version.

Under the Validation option the menu items are:

  • Validate All: Perform all the validation options available

  • Empty Content Validation: Check for objects with no content, for example a table with no columns

  • Table Efficiency Validation: Check the efficiency of tables, for example a table with no primary key defined

  • Duplicate Identifiers Validation: Check for duplicate identifiers, for example two tables with the same name

  • Consistency Validation: Check for consistent naming conventions

  • Logic Validation: Check, for example, that a foreign key does not reference a nonprimary key column in the source table

Under the Validation (MySQL) option the menu items are:

  • Validate All: Perform all the validation options available

  • Integrity Validation: Check for invalid references, for example, a table name longer than the maximum allowed

  • Syntax validation: Check for correct SQL syntax

  • Duplicate Identifiers Validation (Additions): Check for objects with the same name

For detailed information about validation see Section 16.6.10, “MySQL Workbench Schema Validation Plugins (Commercial Version)”.

16.6.5.1.5.3. The Object Notation Menu Options

The options under the Object Notation menu apply exclusively to an EER diagram. They are grayed out if an EER diagram tab is not selected.

The menu options are as follows:

  • Workbench (Default): Display table columns, indexes, and triggers.

  • Workbench (Simplified): Show only a table's columns.

  • Workbench (PKs and FKs only): Show only columns that are primary and foreign keys.

  • Classic: Similar to the Workbench (Simplified) style showing only the table's columns.

  • IDEF1X: The ICAM DEFinition language information modeling style.

The object notation style that you choose persists for the duration of your MySQL Workbench session and is saved along with your model. When MySQL Workbench is restarted, the object notation reverts to the default.

Note

If you plan to export or print an EER diagram be sure to decide on a notation style first. Changing notation styles after objects have been placed on a diagram can significantly change the appearance of the diagram.

16.6.5.1.5.4. The Relationship Notation Menu Option

The options under the Relationship Notation menu apply exclusively to an EER diagram. They are grayed out if an EER diagram tab is not selected. The menu options are as follows:

  • Crow's Foot (IE): The default modeling style. For an example see Figure 16.79, “Adding Tables to the Canvas”.

  • Classic: Uses a diamond shape to indicate cardinality.

  • Connect to Columns

  • UML: Universal Modeling Language style.

  • IDEF1X: The ICAM DEFinition language information modeling method

To view the different styles, set up a relationship between two or more tables and choose the different menu options

The relationship notation style that you choose persists for the duration of your MySQL Workbench session and is saved along with your model. When MySQL Workbench is restarted, the relationship notation reverts to the default, the Crow's Foot style.

Note

If you plan to export or print an EER diagram be sure to decide on a notation style first. Changing notation styles after objects have been placed on a diagram can significantly change the appearance of the diagram.

16.6.5.1.6. The Database Menu

There are several options under the Database menu option:

16.6.5.1.7. The Plugins Menu

The Plugins menu option lists any plugins that you may have installed. For more information about this menu option see Section 16.8.3, “Plugins”.

16.6.5.1.8. The Scripting Menu

This menu currently has three items:

  • Scripting Shell: Launches the MySQL Workbench Scripting Shell.

  • Run Workbench Script: Executes the specified script.

  • Install Plugin/Module File: Enables you to load and install a plugin/module file.

16.6.5.1.9. The Community Menu

The Community menu option offers the following choices:

  • Workbench Blog

  • FAQs About Workbench

  • Learn How To Code For Workbench

  • Discuss Workbench Topics

  • Contribute To Workbench

Use these menu options to go online and learn more about MySQL Workbench.

16.6.5.1.10. The Help Menu

The Help menu option offers the following choices:

  • Help Index: Open a window showing the MySQL Workbench documentation. Read, search, or print the documentation from this window.

  • Check For Updates: Open your default browser on the MySQL Workbench website and check for a newer version.

  • Update: Update to the latest version.

  • MySQL.com Website: Open your default browser on the MySQL website home page.

  • Workbench Product Page: Open your default browser on the MySQL Workbench product page.

  • System Info: Information about your system, useful when reporting a bug. For more information, see Section 16.6.5.1.10.1, “System Info”.

  • Report a Bug: Open your default browser on the MySQL bug report page.

  • View Reported Bugs: Open your default browser to see a list of current bugs.

  • About Workbench : Show the MySQL Workbench About window.

Use these menu options to go online and learn more about MySQL Workbench.

16.6.5.1.10.1. System Info

Use the System Info menu option to determine information about your system. This option is especially useful for determining your rendering mode. Sample output follows.

read_mysql_cfg_file  C:\Program Files\MySQL\MySQL Server 5.1\my.ini
[('tmp_table_size', '9M'), 
('myisam_sort_buffer_size', '18M'), 
('table_cache', '256'), 
('read_rnd_buffer_size', '256K'), 
('port', '3306'), ('max_connections', '100'), 
('innodb_buffer_pool_size', '18M'), 
('myisam_max_sort_file_size', '100G'), 
('sql-mode', '"STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'), 
('basedir', '"C:/Program Files/MySQL/MySQL Server 5.1/"'), 
('default-character-set', 'latin1'), 
('datadir', '"C:/ProgramData/MySQL/MySQL Server 5.1/Data/"'), 
('innodb_log_buffer_size', '1M'), 
('innodb_log_file_size', '10M'), 
('innodb_thread_concurrency', '8'), 
('read_buffer_size', '64K'), 
('innodb_additional_mem_pool_size', '2M'), 
('thread_cache_size', '8'), 
('innodb_flush_log_at_trx_commit', '1'), 
('query_cache_size', '0'), 
('sort_buffer_size', '256K'), 
('default-storage-engine', 'INNODB'), 
('key_buffer_size', '11M')]
MySQL Workbench OSS for Windows version 5.2.8
Cairo Version: 1.8.6
Rendering Mode: GDI requested (create a diagram to confirm)
OpenGL Driver Version: Not Detected
OS: unknown
CPU: Intel(R) Core(TM)2 Duo CPU     T9300  @ 2.50GHz, 1.0 GB RAM
Video adapter info:
Adapter type: VirtualBox Graphics Adapter
Chip Type: VBOX
BIOS String: Version 0xB0C2 or later
Video Memory: 12288 KB
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout