engineering openedge® database to create via odbc · reverse engineering openedge database to...
TRANSCRIPT
SKIL (www.skilglobal.com)
Reverse Engineering OpenEdge® Database to Create Data Models in Microsoft® Visio via ODBC Raghuraman Kadambi [[email protected]]
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
2 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Contents
Background ......................................................................................................................... 3 Software Used in this article ........................................................................................ 3 Creating Sports2000 Data Model ............................................................................... 4 Copyrights and Trademarks ..................................................................................... 19
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
3 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Background Many business applications are written using Progress® OpenEdge®. I am in an opinion that Progress® OpenEdge® was chosen by organizations primarily due to following two reasons
a. OpenEdge® database – Scalable, Robust and Easy to use b. Ease of programming using ABL(4GL) – Reduced development time
Due to this ease, many applications are developed without database documentation. And, as time passes it becomes difficult to create them. Developers have challenge in understanding relationships between the tables in the OpenEdge® database. This forces them to assume, ask senior developers or walk through the Progress® procedures to understand the table relationships. It’s frustrating! It is said, “Need is the mother of all invention”. I faced similar challenge over a decade ago and I found a way out at that time! I have updated the screenshot with Progress® OpenEdge® 11.5. This article describes in steps to “Reverse Engineering OpenEdge® Database to Create Data Models in Microsoft® Visio® via ODBC”
Software Used in this article 1. Microsoft Office Visio Professional 2007 2. Please verify the links and the respective websites and the product owner’s
product manuals for current information on the subject. 3. Please ensure reading the product documentation for Visio or ODBC Drivers for
updated information. 4. Progress® 11.5 ODBC Drivers was used for this article (generally, gets installed
with the product 11.5). 5. OpenEdge® Sports2000 Database 6. Progress® OpenEdge® 11.5 7. Windows OS
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
4 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Creating Sports2000 Data Model
1. Since you are using Microsoft Visio to connect to OpenEdge® database, it is important that you create a USER in the OpenEdge® database along its password. This can be done in Data administration interface (Admin Security Edit User List). For this article I will be using Sports2000 database and database created user credentials as follows; User ID: admin, Password: admin
2. Start the application OpenEdge® database on a Port number (not service name). refer to command; proserve D:\OpenEdge\wrk\db\sports2000.db –H localhost –S 5555 –N TCP
3. Open Microsoft Visio Professional 4. Select “Category” as “Database” and within the “Database”, select “Database
Model Diagram (US Units)”. Save the Data Model as “Sports2000.vsd”
5. Select the menu Database Reverse Engineer
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
5 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
6. Select “ODBC Generic Driver”
7. Click “New” (you may select User DSN if you do not have privileges)
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
6 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
8. Click “Next”
9. Click “Next” and Click “Finish”
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
7 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
10. Enter the Sports2000 Environment setup
11. Click “Test Connect” to connect to the your db names database
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
8 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
12. Click “Apply” and “OK” to save the settings.
13. Click “Next”
14. A warning may appear! Click “OK” to continue.
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
9 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
15. Select the following and click “Next”
16. Click “Select All” to select all the tables in your db names database and click “Next”
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
10 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
17. A warning may appear! Ignore this warning and continue by clicking “Yes”
18. Select “Yes” is you have few tables else select “No” and click “Next”
19. Select table(s) to load into the Visio diagram
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
11 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
20. Click “Finish”. This will load all the tables defined in your db names database into visio. It might take some time to load all the tables.
21. Once the tables are loaded into Visio, the same would appear in the “Tables and View” frame on the left side. In order to view “Tables and Views” use the menu as given below
Loaded tables of sports2000.db
Visual representation of loaded tables
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
12 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
22. Your sports2000 database tables loaded into Visio
23. Save the document. 24. If you have multiple OpenEdge® database, you may load tables from other
databases following similar steps as done for database your db names into the same document so that all the tables are available in the same document and Data Models for various modules can be drawn in the same document.
25. Save the document after all the database tables are loaded. Once we have loaded all the tables of all the Sports2000 databases, we are now ready to build the Data Models for any modules that we desire.
26. The entire database tables are loaded into the Data Model document
Sports2000.vsd.
27. The tables could be dragged and dropped from the Tables and View pane to the document. However, this would put the entire table fields into the document. Instead of loading all the table fields, only the primary/unique key and indexes can be loaded into the page. In order to do this follow the below steps
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
13 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
28. Change the “Document” options
29. Follow the following settings for tabs “General”, “Table” and “Relationships”
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
14 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
15 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
30. Drag and following tables Customer, Order, OrderLine, BillTo and SalesRep tables from the “Tables and Views” pane to the page “OrderModule” and start drawing relationships. Drag the “Relationship” icon from the left pane as indicated and drop on Customer table as indicated on the right pane. This would draw by default “Zero to Many” Relationship from Customer and Order tables.
Update the relationship in the “Miscellaneous” section as indicated in the below screen if you wish to override default relationship.
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
16 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
31. You could also change table colors. Ex. select table Item and change the color of the table as below:
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
17 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
18 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
32. Repeat the above steps for all the tables displaying in the page “OrderModule” 33. Add text to tables name as text box on top of each tables (use guide and grip for
alignment if required) 34. Re-arrange the tables to draw the relationships (to minimize the relation ship
lines cross-over) 35. You could now “Publish as PDF” from Visio “Files” menu. This completes your
data model. I hope you have enjoyed the reading the article!
Reverse Engineering OpenEdge Database to Create Data Models in Microsoft Visio via ODBC
19 | P a g e w w w . s k i l g l o b a l . c o m v 2 . 0
Raghuraman Kadambi([email protected])
Copyrights and Trademarks Progress® and OpenEdge® are trademarks of Progress Software Corporation,
USA. "PMP" & "PMI" are registered marks of the Project Management Institute, Inc. Microsoft®, Visio® and Windows® are registered trademarks of Microsoft
Corporation, USA. All other trademarks and logos reference in this article belong to their respective
owners.