Hi. My name is Matthew Phan, Systems Consultant for Dell Software. In this video, I'm going to show you how to create your first model with Toad Data Modeler. Here, I have Toad Data Modeler open with a sample video rental model.
Before we get to this point, let's start with the basics. I'm going to click on New Model. And you can see the large number of platforms we support for physical modeling. These are the databases Toad Data Modeler would forward engineer your model towards. If you wanted to create a generic, universal model, you can do so by clicking on Universal Data Model. You can later convert a universal model to any other physical model. Or, if you need to create a logical model with inheritance, select Logical Data Model. I'm going to select Physical Oracle 11 GR2 database.
Now I'm going to add an entity to workspace to represent a customer table. I'm going to select Entity, and then click on my workspace. I'll double click on my entity. I'll type in the name of my table. Then I'm going to click on the Attributes tab to add my column information. You can see I can quickly add as many columns as I'd like.
I can also make changes to the data type using this drop down menu. I can specify my keys by clicking on the Keys tab, click Add, and modify my first key. I'm going to make customer ID as my key. As I'm making changes to this entity, I can click on SQL Preview to see how Toad data Modeler is forward engineering this particular entity into Oracle.
Now, I'll even add an index for this entity. I'm going to index the name column. I've just created my first entity representing my customer table. I going to add a few more entities before we move on.
Now that I have some tables to work with, I'm ready to draw the relationships between them. In my application, every order references a customer and a film. So this order records table will need to have identifying relationships to films and to customers. I'll click on the Identifying Relationship icon. Then I'll select the film table. Then I'll select the order record table.
You can see, it brought over the film ID column as a form primary key, and the relationship is represented with a solid line. I'll do the same thing for the customer table, but since customer ID is already an attribute in my order table, Toad will just modify it to become a form primary key. Genre is a look up table for film, so it requires a non-identifying relationship. I'll select Non-identifying Relationship. Then I'll click on genre. And then I'll click on film.
As you can see, a non-identifying relationship is represented by a dotted line. I can modify any of the relationships by double clicking on them to open up the Properties dialog. Here, I can modify properties such as relationship type, cardinality, or referential integrity. I can also add other informative items to my workspace, such as stamps, shapes, text, and notes. I'll continue adding things to my model until we have a model that's more fleshed out, like the video rental model that we saw at the beginning.