Hi this is Jeff Podlasek with Toad DB2 Development. As a developer, or a DBA, it is important for you to understand the interdependencies your database objects have so you could get a better understanding of what objects are related and important to other objects. And I'm not just referring to relationships between tables.
That has been seen in a feature with Toad for DB2 as a database diagramer since the first release of Toad for DB2. That, in essence, is an ER diagramer, but knowing the relationships between all database object types will give you the greatest insight to you system.
Toad for DB2 has introduced a visual database map feature that gives you this insight. And in this video, I'm going to demonstrate this feature. I have Toad up and running, and I'm connected to a DB2 LUW database. This feature worked for DB2 LUW as well as ZOS. But this is DB2 LUW.
And I'm going to right click on a table that I have in my database browser and select the Show on Database Map. Now, Toad opens a database map tab and a document. And the item that I selected, or items that I selected, are loaded and displayed visually within this control.
And you can see that there's a color coordination going on where colors identify certain object types. So the table that I've entered with is blue and is in the middle. And since I previously invoked this feature with these options checked-- one to include referenced objects, and one to include depending objects-- all of those have been loaded at the same time.
If I want to toggle the display right now-- right now the table that I've entered with references a tablespace, so if I toggle that, the tablespace will go away. If I toggle the dependent objects, all the table's dependent objects will go away.
But the main, huge value of this is being able to see objects in their relation to other database objects. Meaning, we're not just talking table to tables, but we're seeing tables and you can see their indexes, their views, what procedures, what functions, what cursor type, and row type reference those tables. It's a very, very powerful feature.
And this feature's got a lot of bells and whistles built into it, such as you could format the layout in many different optional ways. We've got some zoom controls. You could use the mouse scroll bar to zoom in and out. You could use the zoom control buttons on the side to zoom in and out. You could snap to a full screen zoom if you wanted to.
There is a legend that gets displayed that sort of tells you, like, because as you're hovering over objects, the border of those will change color, and this legend will tell you what the color means. So the actual object that you're hovering over turns golden, the outline of it turns golden, and its referenced objects turn red, and its dependents turn blue. So pretty easy to understand there.
And just like Toad and all over Toad, we're very right mouse click centric. So Toad is very powerful in this feature too. If you do a right mouse click, you could invoke virtually any action that's available for the object that you've selected right from this display.
I'm going to close this down. This display, you could also save. If you wanted to save and reference this again, you could save it as a file and bring it up again. Or if you want to print this diagram, you could also print this diagram. I'm just going to close it down.
And I'm going to bring up an empty database map right now, and show you there's another way to interface with it. You could basically drag and drop objects from an object explorer. So I'm just bringing up an object explorer.
And again, I'm going to select a set of tables. And I'm going to just drag over tables one by one. And each time you drag an object, that object and its dependencies get loaded. So I'm just dragging over four tables in this example here.
And you'll see that this diagram actually looks pretty cool. I mean, it gives you an understanding of, OK, I've brought these four tables over, now what's common with them? Well, what's common with them is well, they're all within the same tablespace. And they're all referenced by this view. But then independently you can see that each table has its own set of indexes that reference it.
So very easy to identify relationships between all database object types. And we believe that this feature will be very useful and helpful for you to gain insight into your systems.