Author: plavin
Date: 2007-12-12 17:21:47 +0100 (Wed, 12 Dec 2007)
New Revision: 9261
Log:
Update forward engineering
Modified:
trunk/workbench/Makefile.depends
trunk/workbench/forward-engineering.xml
trunk/workbench/reverse-engineering.xml
Modified: trunk/workbench/Makefile.depends
===================================================================
--- trunk/workbench/Makefile.depends 2007-12-12 14:03:16 UTC (rev 9260)
+++ trunk/workbench/Makefile.depends 2007-12-12 16:21:47 UTC (rev 9261)
Changed blocks: 2, Lines Added: 4, Lines Deleted: 1; 1086 bytes
@@ -79,7 +79,9 @@
forward_engineering_IMAGES =
forward_engineering_SOURCES = forward-engineering.xml $(forward_engineering_INCLUDES)
forward_engineering_IDMAPS = \
- metadata/options-connections.idmap
+ metadata/forward-engineering.idmap \
+ metadata/options-connections.idmap \
+ metadata/reverse-engineering.idmap
forward-engineering.validpure: $(forward_engineering_SOURCES)
forward-engineering.titles: $(forward_engineering_SOURCES)
forward-engineering.useless: $(forward_engineering_SOURCES)
@@ -304,6 +306,7 @@
images/published/successful-connection.png
reverse_engineering_SOURCES = reverse-engineering.xml $(reverse_engineering_INCLUDES)
reverse_engineering_IDMAPS = \
+ metadata/forward-engineering.idmap \
metadata/options-connections.idmap \
metadata/tutorial.idmap
reverse-engineering.validpure: $(reverse_engineering_SOURCES)
Modified: trunk/workbench/forward-engineering.xml
===================================================================
--- trunk/workbench/forward-engineering.xml 2007-12-12 14:03:16 UTC (rev 9260)
+++ trunk/workbench/forward-engineering.xml 2007-12-12 16:21:47 UTC (rev 9261)
Changed blocks: 2, Lines Added: 122, Lines Deleted: 50; 6406 bytes
@@ -9,34 +9,139 @@
<title>Forward Engineering</title>
+ <para>
+ It is possible to forward engineer a database using an SQL script or
+ by connecting to a live database. Forward engineering to a live
+ database is available for commercial versions of &workbench; only.
+ </para>
+
<section id="wb-forward-engineering-sql-scripts">
<title>Forward Engineering using SQL Scripts</title>
<para>
- To forward engineer a database use the <guimenu>Export</guimenu>
- option found under the <guimenu>File</guimenu> menu. You may
- export a script to alter an existing database or create a new
- database.
+ To create a script of your database model use the
+ <guimenu>Export</guimenu> option found under the
+ <guimenu>File</guimenu> menu. You may export a script to alter an
+ existing database or create a new database. The script to create a
+ database is similar to the one created using the
+ <command>mysqldump <replaceable>db_name</replaceable></command>
+ command.
</para>
<para>
- <remark>
- Create
- </remark>
+ If you choose to create a database, there are a number of export
+ options that you may choose from.
</para>
- <para>
- <remark>
- ALTER is for comparing with another CREATE script and generating
- an ALTER script so that a live db that was created with the
- former is updated the png option will export an image of the
- current canvas same for pdf and ps (alfredo)
- </remark>
- </para>
+ <section id="wb-export-script-create-sql">
+ <title>Export Options: Creating a Schema</title>
+
+ <para>
+ The SQL export options are as follows:
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ Generate DROP statements (except DROP DATABASE)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Generate separate CREATE INDEX statements
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Generate SHOW WARNINGS after every DDL statement
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Do not create users, just export privileges
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Generate INSERT statements for tables
+
+ <remark>
+ What does this do?
+ </remark>
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </para>
+
+ <para>
+ Choose the option <literal>Generate separate CREATE INDEX
+ statements</literal> to create a separate statement for creating
+ indexes rather than having indexes created in the <literal>CREATE TABLE</literal>
+ statement. To update the privileges of existing users as opposed
+ to creating new users, select the <literal>Do not create users,
+ just export privileges</literal> check box.
+ </para>
+
+ </section>
+
+ <section id="wb-export-script-alter-schema">
+
+ <title>Export Options: Altering a Schema</title>
+
+ <para>
+ The menu option for altering a schema, <guimenu>Forward Engineer
+ Alter Script ...</guimenu>, is used for updating a database that
+ has been redesigned within &workbench;. Typically, this option
+ is used when the SQL script of a database has been imported into
+ &workbench; and changed. For instructions on importing a DDL
+ script see <xref linkend="wb-reverse-engineer-create-script"/>.
+ </para>
+
+ <para>
+ Choose this menu option and on the first screen, <guilabel>SQL
+ Sync Options</guilabel>, you are asked to supply an input file.
+ In most cases this will be the file that you imported into
+ &workbench; using the <guimenu>Reverse Engineer MySQL Create
+ Script</guimenu> menu option found under the
+ <guimenu>File</guimenu>, <guimenu>Import</guimenu> options.
+ In any case, this file should represent the state of the
+ exported database prior to alteration.
+ </para>
+
+ <para>
+ The differences between the original database and the altered
+ database are displayed on the next screen, the <guilabel>SQL
+ Diff Tree</guilabel> window. To view the details click the
+ <guibutton>+</guibutton> button to the left of the model
+ database.
+ </para>
+
+ <para>
+ Pressing <guibutton>Next</guibutton> brings you to the
+ <guilabel>SQL Script</guilabel> screen. Here you can review and
+ change the ALTER script that will be generated. Make any changes
+ you wish and, if you are happy with the changes, save the
+ <literal>ALTER</literal> script to file using the
+ <guibutton>Save to file ...</guibutton> button.
+ </para>
+
+ <para>
+ Use the saved script to update the database.
+ </para>
+
+ </section>
+
</section>
+<!--end section on forward engineering using a script-->
+
<section id="forward-engineering-live-server">
<title>Forward Engineering to a Live Server (Commercial Version)</title>
@@ -57,41 +162,8 @@
</para>
<para>
- The next screen offers SQL export options. These are as follows:
-
- <itemizedlist>
-
- <listitem>
- <para>
- Generate DROP statements (except DROP DATABASE)
- </para>
- </listitem>
-
- <listitem>
- <para>
- Generate separate CREATE INDEX statements
- </para>
- </listitem>
-
- <listitem>
- <para>
- Generate SHOW WARNINGS after every DDL statement
- </para>
- </listitem>
-
- <listitem>
- <para>
- Do not creatre users, just export privileges
- </para>
- </listitem>
-
- <listitem>
- <para>
- Generate INSERT statements for tables
- </para>
- </listitem>
-
- </itemizedlist>
+ The next screen offers SQL export options. These options are
+ described in <xref linkend="wb-export-script-create-sql"/>.
</para>
<para>
Modified: trunk/workbench/reverse-engineering.xml
===================================================================
--- trunk/workbench/reverse-engineering.xml 2007-12-12 14:03:16 UTC (rev 9260)
+++ trunk/workbench/reverse-engineering.xml 2007-12-12 16:21:47 UTC (rev 9261)
Changed blocks: 1, Lines Added: 10, Lines Deleted: 0; 883 bytes
@@ -41,6 +41,16 @@
with a script that contains DML statements you need not remove
them; they will be ignored.
</para>
+
+ <note>
+ <para>
+ If you plan to redesign a database within &workbench;
+ and then export the changes, be sure to retain a copy of
+ the original DDL script. You will need the original script in order to create an
+ <literal>ALTER</literal> script.
+ For more information see <xref linkend="wb-export-script-alter-schema"/>.
+ </para>
+ </note>
<para>
Use the <option>--databases</option> option if you wish to create
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r9261 - trunk/workbench | plavin | 12 Dec |