ERD – Fancy way of saying Entity-Relationship Diagram
Since version 10.0 of Toad for Oracle, users have been able to select a table and have an ERD generated that automatically includes any related tables via Referential Integrity.
However, what if you are trying to document a view which may bring in one or more other views and any number of tables? Fortunately Toad has a diagramming feature that is not limited to referential integrity, e.g. Foreign Key constraints.
This feature is known as the Code Road Map. Primarily used for identifying all objects used by a PL/SQL object (function, procedure, type, trigger, package body), the Code Road Map parses the base object looking for references to other database objects. Now, here is where it gets interesting. For each identifying object, it also parses its source and keeps going until it resolves everything required to be able to compile the original object without error.
For version 10.5 of Toad, you can now use the Code Road Map against a view and also build a ERD. It will pull in everything you need, and no need for foreign keys or references in the data dictionary ‘dependency’ views. Let’s look at an example.
Getting Started
The Model
Once the Diagram has been built, you can zoom in or out until you get the ideal viewing experience. There is a really neat Loupe tool for zooming into just a piece of the model. You can also create sub-models to split out subsets of objects in case you have too much going on in the main diagram.
Build a WYSIWYG Report
Awww, my favorite acronym. Look it up. Use the ‘Report’ button to generate an HTML version of the diagram that is rendered exactly as it appears in Toad. This way you can share your models with anyone in your organization that has access to your Intranet, but not to Toad.




Twitter
RSS
GooglePlus
Facebook
Jul 22, 2010 @ 12:04:46
Sweeeeeet. Toad is a remarkable tool!!! never stops impressing me!
Jul 29, 2010 @ 22:09:51
it was very interesting to read http://www.thatjeffsmith.com
I want to quote your post in my blog. It can?
And you et an account on Twitter?
Jul 30, 2010 @ 07:02:24
Feel free to quote away, please add a link back to my post. My Twitter handle is @hillbillyToad, there is a follow link on my blog site.
Toad Tips | Reverse Engineer Views into an ERD
Aug 14, 2011 @ 12:27:15
[...] Also, a post on Reverse Engineer Views into an ERD [...]
Aug 05, 2010 @ 16:55:34
Nothing makes me happier than to know I’ve struck a nerve out there. If you don’t mind me asking, how did you find this article? Also, you a PeopleSoft or Banner user? Both seems to enjoy avoiding Foreign Keys at all costs!