Address: http://blog.163.com/zgkingdom@126/blog/static/2273473200892714445447/
Three steps.
<1> Create a data source
Open Control Panel-> Administrative Tools-> data source (ODBC), or directly run the odbccp32.cpl command. Open the ODBC data source Manager. Add a system data source. Select SQL Server as the data source driver, type the data source name demo, select the appropriate SQL server Server, and then go down all the way to default. (In the subsequent steps, you can select the database for reverse engineering. The default value is master.) the data source information is displayed.
Figure 1
<2> Create a database model in visio
Open visio 2003, file-> New-> database model diagram. After creating a database model diagram, there is an additional menu item "Database" in the menu bar ".
<3> Reverse Engineering
Menu item database-> reverse engineering. Start the reverse engineering Wizard to complete reverse engineering settings step by step.
1. Establish a connection with the database. The type of the visio driver determines the database type that can be connected and available options. Specifies the database location and connection information for the data source. Here, we select the visio driver as Microsoft SQL Server and the data source as the created demo. II.
Figure 2
2. Connect to the data source. Enter the user name and password to connect to the data source.
3. Select the object type for reverse engineering.
Figure 3
4. Select the tables and views for reverse engineering.
5. Select a stored procedure for the project.
6. Do you want to add the selected reverse engineering item to the current project. Select Yes to generate the graph.
The results are roughly as follows.