Take IBMDB2For example,VisioReverse join DB2 generationE-R DiagramThe process is as follows:
1. Create an ODBC Data Source
Open Control Panel> Administrative Tools> data source (ODBC) to open the ODBC data source Manager. Select system DSN to add a system data source. Select IBM DB2 odbc druver as the data source driver-> click "finish" and enter the data source name "TEST", database alias "test" (the DB2 database to be connected ), description "TESTDES", click "OK" to return to the ODBC data source Manager interface. select "TEST" for the data source and click "Configure" to connect to the data source to retrieve configuration information, enter the user ID and password (connect to "test" (the user name and password of the database), and click "OK. complete data source configuration.
2. Create a database model diagram in visio
Open visio, file-> New-> database model diagram. After creating a database model diagram, there is an additional menu item "Database" in the menu bar ". Click database menu-> reverse engineering. in the reverse engineering wizard, select "ODBC universal driver", "Data Source" select "TEST", and click "Next, enter the username and password for connecting to the database, click "OK", "Object Type", select table, primary key, index, and foreign key, and click "Next, select the table for which the ergraph is to be generated, click "Next", select "yes", add the shape to the current page ", click" Next ", and click" finish.
Follow these steps to successfully generate a E-R diagram for the database.