As many of you could notice in a new version of Microsoft Visio 2010, as in previous versions, there is a possibility to draw and design database schemas. This is very useful feature, creates documentation, gives you the visual overview and simplifies the hands
on. However Microsoft somehow in this version didn’t give us the possibility to transform our designs into scripts, in order to deploy easily and quickly what we designed. If you are unaware on how to create database design via Visio 2010 take a look on this
. This guide will show you how to create a database diagram from scratch and how to reverse engineer the diagram from already existing database. It is a good point from
where to start.
Installing the add-in
The installation procedure is simple. Download the recommended version of add-in from the download page (http://forwardengineer.codeplex.com/releases/view/62782
). Execute the setup file and
follow the procedure. The procedure will check if all requirements are satisfied and if so will proceed. Further the installation will copy the needed files into chosen directory and register the add-in by adding the required keys into the registry.
These are the steps of installation procedure:
Choose the installation folder and the scope of the add in:
Click on next to install the add-in:
Once installed, just click on close to end the installation procedure:
Once installation is finished, open Visio and you should see the new ribbon available:
Create your project and once the design is done, click on Forward Engineer ribbon:
Now you have 2 choices:
- Validate Data Model
- Forward engineer
If you choose Validate Data Model
your data model will be checked and you can follow the output window and check the validation messages:
If your model is ready you can now generate the script. Choose Forward engineer
button from the menu and you will get the following window:
Now you have several options. You can choose database name, so all the script will contain USE directives pointing to the right database.