How To Use Microsoft Visio To Reverse Engineer A Database
Wed 4th August 2010
It is extremely important to document databases for many reasons. It is however, an extremely tedious task to manually build a database diagram having gone through the individual tables and views etc. Visio has the functionality to reverse engineer a database for you with minimal effort. It will automatically take the database you give it and create a diagram of all the tables and fields.
It is extremely important to document a database in order for other people to fully understand it. Sometimes you will be off work for a number of reasons and someone else may need to perform a task and require documentation for help. When you come to train someone else or hand over the database to another party then documentation is a vital resource in the learning curve and will prevent misunderstanding later.
It is however, an extremely tedious task to manually build a database diagram having gone through the individual tables and views etc. Visio has the functionality to reverse engineer a database for you with minimal effort. This means that it will automatically take the database you give it and create a database diagram of all the tables and fields. This is done via a wizard, allowing the user to select individual tables or all tables if required. The database diagram can then be altered, rearranged and formatted as required for inclusion in documentation or presentation. Freedom of design is therefore not compromised, but enhanced by using this feature.
To begin the process, open Visio and choose File and New. In the template categories, select the Software and Database section and then Database Model Diagram. On the ribbon the Database section will automatically appear containing all options relating to this type of diagram. Go to this section and choose Reverse Engineer to access the wizard. Select the appropriate database option, in this example we are importing the schema from an Access database, but there are several other types you can use. Click Next and enter any User name and Password required or leave the fields blank if this is not necessary.
On the next pop up locate the database within the correct drive. Click OK and on the next screen select the options required such as tables, views, primary Keys etc. in order to tell Visio what to include on the final diagram. If for example there are no stored procedures in the database then this option will be greyed out. Click Next and a list of all tables should appear. You can choose to select everything or choose individual tables required for the diagram. Click Next and then choose whether Visio will add the shapes or if you would like to do it yourself. You will then be given a chance to review the information that will be placed on the diagram before you create the finished piece. If everything is as required then click Finish.
A diagram and a summary of what was reversed engineered, which can be closed, are then presented on the screen. This final diagram can be formatted and rearranged quite easily. Click on individual tables and drag them to where you want them to be. Double click on a table to show the table information which can be altered such as the table name. Right click and choose Format in order to format the Lines, colours or font.
On the left side of the screen are lists of symbols that can be added to the diagram as required by the diagram designer. These are organised into logical categories such as Entity Relationship, Object Relationship and Quick Shapes. When adding any symbol, click it and drag it onto the page. You will then be able to move it to the correct position, adjust its size and change its formatting to match the diagram styles. Using this functionality it is possible to quickly and easily create professional database diagrams which are good enough to be used in presentations and external documentation.
You have permission to publish this article for free providing the "About the Author" box is included in its entirety.
Do not post/reprint this article in any site or publication that contains hate, violence, porn, warez, or supports illegal activity.
Do not use this article in violation of the US CAN-SPAM Act. If sent by email, this article must be delivered to opt-in subscribers only.
If you publish this article in a format that supports linking, please ensure that all URLs and email addresses are active links, without the rel='nofollow' tag.
Software Training London Ltd. owns this article. Please respect the author's copyright and above publication guidelines.
If you do not agree to these terms, please do not use this article.
"This was the best and most fascinating session of all. I got the chance to perform and to receive feedback from such an experienced trainer as Jules. Hope to meet her again."
One Aldwych Hotel Reservations Manager Kirsty Williams
"The training was delivered at a very good pace and Martin was quick to assist if we have any questions or needed some extra help. Martin ensured the whole team achieved what they wanted for the day and spent the relevant amount of time on a topic based on the team who attended. Everything was fully explained and sufficient time to make notes was given."
MOL (Europe Africa) Ltd Assistant Technical Manager James Dallimore
"Very well delivered and throughly engaging. Re. content sometimes it felt slightly unstructured jumping from different aspects of the project management, it would be helpful for me if maybe it went one by one of the stages from start to end of a project maybe with case study examples. For the case study exercise in pairs I felt it was a bit rushed and no time to relfect each other answers in depth. Really enjoyed the course and covered a lot of items in s short space of time which I will be able to apply to my work scope."