workbench-en.a4
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
MySQL Workb<strong>en</strong>ch Refer<strong>en</strong>ce<br />
6.1.2. Docking and Undocking Windows<br />
Of the windows shown in the default view of MySQL Workb<strong>en</strong>ch only EER diagrams and the MySQL Model page may be undocked.<br />
To detach one of these widows double click the desired tab. Doing this immediately undocks a window. Redock a window<br />
by double clicking the title bar. Doiong this docks the window at its previous location in the main application window .<br />
To change the docking location of a window, left click and drag its title bar, or if the window is a tabbed window, you may also<br />
drag it by left clicking its tab. Doing this displays the docking tool shown in the following.<br />
Figure 6.2. The docking tool<br />
Drag a window over the main application window and a docking tool is displayed for each of the five docking areas id<strong>en</strong>tified in<br />
Section 6.1.1, “The Application Layout”. Drag the window you wish to dock towards your preferred docking area. Notice that the<br />
shading changes indicating the area where the window will be docked. To create a tabbed window drop the window at the c<strong>en</strong>ter of<br />
the docking tool.<br />
If you close a window by clicking the X button you can reop<strong>en</strong> it by choosing the appropriate option under the VIEW, WINDOWS<br />
m<strong>en</strong>u option; it will reappear at its last location. For more information about the WINDOWS m<strong>en</strong>u options see Section 6.2.3, “The<br />
View M<strong>en</strong>u”. To reop<strong>en</strong> the MySQL Model window use the OVERVIEW option found under the VIEW m<strong>en</strong>u.<br />
6.2. MySQL Workb<strong>en</strong>ch M<strong>en</strong>us<br />
Some m<strong>en</strong>u options are not available in the OSS version of this application. M<strong>en</strong>u items marked SE in MySQL Workb<strong>en</strong>ch OSS<br />
version, indicate m<strong>en</strong>u options that are <strong>en</strong>abled in the standard edition only.<br />
6.2.1. The File M<strong>en</strong>u<br />
Use this m<strong>en</strong>u item to op<strong>en</strong> a project, begin a new project, or save a project. Choosing NEW op<strong>en</strong>s the default schema, mydb.<br />
Choosing OPEN op<strong>en</strong>s a file dialog box with the default file type set to MySQL Workb<strong>en</strong>ch Models (MWB). To display a list of rec<strong>en</strong>tly<br />
op<strong>en</strong>ed MWB files, choose the OPEN RECENT m<strong>en</strong>u option. The keyboard command to create a new project is Ctrl N and<br />
the command to op<strong>en</strong> an existing project is Ctrl O.<br />
To close the curr<strong>en</strong>tly active MySQL Model or EER Diagram tab, use the CLOSE TAB option. You can also do this from the<br />
keyboard by pressing Ctrl W. To reop<strong>en</strong> the MySQL Model tab, see Section 6.2.3, “The View M<strong>en</strong>u”. To reop<strong>en</strong> an EER Diagram<br />
tab double click the EER Diagram icon in the EER Diagrams section of the MySQL Model page.<br />
Use the SAVE or SAVE AS m<strong>en</strong>u options to save a model. Wh<strong>en</strong> you save a model its name appears in the title bar of the application.<br />
If you have made changes to a project and hav<strong>en</strong>'t saved those changes, an asterisk appears in the title bar following the model<br />
name. Wh<strong>en</strong> you save a model it is saved as a MySQL Workb<strong>en</strong>ch file with the ext<strong>en</strong>sion mwb.<br />
Use the IMPORT m<strong>en</strong>u option to import a MySQL data definition (DDL) script file, one created by issuing the command mysqldump<br />
--no-data, for example. If the script does not contain a CREATE db_name; statem<strong>en</strong>t, the schema objects will be<br />
copied to the default schema, mydb. If the script creates a database, a new tab bearing the database name is added to the Physical<br />
Schemata section of the MySQL Model page. If the script contains data, it will be ignored. Importing a DDL script is discussed<br />
in detail in Section 15.1, “Reverse Engineering Using a Create Script”.<br />
Under the Import m<strong>en</strong>u option you can also import DBDesigner4 files.<br />
There are variety of options under the EXPORT m<strong>en</strong>u item. You may g<strong>en</strong>erate the SQL statem<strong>en</strong>ts necessary to create a new database<br />
or alter an existing one. These m<strong>en</strong>u items are discussed in detail in Section 16.1, “Forward Engineering Using SQL Scripts”.<br />
Using the EXPORT m<strong>en</strong>u item you can also export an EER diagram as a PNG, SVG, PDF or Postscript file. For an example of a<br />
PNG file see Figure 5.1, “The sakila EER diagram”.<br />
The print options are only <strong>en</strong>abled if the EER DIAGRAMS tab is selected. You have the choice of printing your model directly to<br />
your printer, printing it as a PDF file, or creating a PostScript file. For more information see Chapter 18, Printing (Commercial<br />
12