Hi. This is Jeff Podlasek with Toad DB2 development. This session is going to cover some of the key developer features for DB2 on LEW as well as DB2 on ZOS that are available in Toad for DB2.
Now, as a developer, it's important to understand the dependencies of your objects so you know how they are related to one another. Toad for DB2 for both LUW and ZOS has several features that assist you in identifying dependencies of your database objects. I've got Toad up and running, and I'm connected to several different databases. This tab is the Database Explorer tab for a DB2 LUW connection. And as we discussed in previous sessions, the Database Explorer on the left-hand side shows the objects, and on the right-hand side, it shows specific properties about that object.
So if I select this Employee table on the left-hand side, I'll be able to traverse and go through various tabs on the right-hand side. And one of them in this session that we're going to cover is the Dependencies tab. Now, this tab shows you which objects your currently selected object uses, and then which objects are used by that object. So for example, for this Employee table, it lives in tablespace userspace 1, and it's used by other tables that have RI, and it's used by views that reference it. And it is referenced by constraints, et cetera. So you can see there's many objects that actually use this current employee table. So it's a very handy way of identifying first level dependencies, is using this view here.
What you can also do is on any of these objects, you can right click, and you can invoke all the actions that are associated with that object type. So for example, any-- right clicking is a very common feature in Toad. So if you right click on an object in the Object Explorer, you'll get all the actions you could run against that object. And the same is true in our Dependency tab. In the Dependency tree, you right click on an object, and you can invoke all of these same actions that you could. So it's an interactive dependency viewer.
One thing that I like to do, perhaps, is to take an object here, and code gives you the ability to view multiple objects at the same time. So a lot of times, I'll right click and say, send to object details. And this will open up our Object Detail Viewer, where you can see that view that I just clicked on-- you can see that its right-hand side tabs, such as Columns, Data, Properties, Dependencies, et cetera, gets displayed. So it's a very handy way of looking at information from one object and the second object at the same time.
I'm going to close this Object Details View down. Another feature that we have inside of Toad for DB2 is a database diagram that in essence is an entity relationship that shows you the relationships between your tables. So to invoke that, you could right click on a table and say send to database diagram. And the Database Diagram tab view gets displayed.
Now, you can see that many tables are actually displayed on this diagram. And that is because there's a bunch RIs associated with that table. So I open this with the Employee table, but Toad automatically will go through and identify the tables that are related to it, and bring those in the diagram as well. And so once this diagram is up, there's several different options you could have. There's actions on the toolbar. You could just click on this button, and it will automatically arrange the tables for you. So it gives you a hierarchical view. You could always drag these tables around if you wanted to change the view somewhat. So it's an interactive diagram.
If you wanted to, there's some options associated with each table. So for example, if you wanted to see additional column information, like the data types for each one of those columns, you could select to see that. If you wanted to see things like if the columns were nullable, you'll be able to identify those values as well. So those are some of the options that we have per table here. I'm just going to turn those off and save some real estate here. Now it gets smaller.
And you can see at the bottom of each table, if it does reference another table, that is documented as well. That's because the Show Dependencies checkbox is on. So that's something that's relatively configurable for you to take advantage of Toad's configurability to show the dependent objects here or not.
You can also see those with these lines. So these lines are basically showing the relationships between tables. And what you can do-- since this is a diagram, and you could save this, and then bring it up whenever you want, and you could customize it. So what I'm going to do-- I'm going to get rid of some of these tables and remove them from the display just by clicking the X and making this a more simpler type of display. So there you go. So I'm paring it down to the relationships that I might want to save and restore this diagram in the future.
Another thing that's a nice feature within this database diagram is the ability to actually click on some of these relationships. And when you click on a relationship like that, a Venn diagram gets displayed. And this Venn diagram is a visual representation of the data in both the master or parent slash child table. But it's an interactive diagram as well. So if you click on the diagram, Toad is going to go out and fetch those rows that represent the shaded part of the diagram that you clicked on.
So for example, I clicked on these rows. And in the Venn