Hello again. This is Mathew Phan, Systems Consultant with Dell Software. In this video, I'll demonstrate how to reverse engineer a model from a database connection, and also show you how to personally manage your models using version manager. I showed you how to create a model from scratch.
Now let's create a model by reverse engineering and live database. Simply go to File, Reverse Engineering, Reverse Engineering Wizard. If you have any previous connections, they'll be displayed here. Since I don't, I'm going to click Next. You'll be presented with a list of databases that we can reverse engineer from. We can also reverse engineer from script files as well. I'm going to reverse engineer from an Oracle 11 GR2 database.
Since I have an Oracle client installed, I'm going to select Native Client connection. Enter the database login information. Select the items you want to reverse engineer. And then you'll be presented with a list of options that you can modify. I'll go ahead and use the default options. You'll be prompted, if you want to save this connection. Feel free to save it if you're going to use it again in future.
Since I know my application starts with T-underscore, I'm going to filter my list down to just the objects that start with T-underscore. Once I've selected my objects, click on Execute to begin the reverse engineering.
And now, I have all my objects that I've selected presented to me on my workspace, with all the relationships drawn in. This can be huge time saver, compared to creating models from scratch. Before we go on, I'll go ahead and save this model.
Let's say I want to keep track of the different versions of this model and I want to make this my baseline model. You can go to Settings, Options, and under General, make sure Expert Mode is checked on. With Expert Mode on, you'll have access to this Expert Mode menu. Within it is the Version Manager. With Version Manager, I can keep track of the changes I've made to my model by adding it to a project.
You can see here, the model is version 1.0. When I save a model to a project and open it from the Version Manager, you'll see now there's a version number next to the model name. Now I'll take this model that I've reverse engineered and make some changes. I'll add a column, Username, to the customer table. I'll delete the Director column from the film table. And I'll modify the varchar size of genre name. Now, instead of the Save button, I can click on Check In. It will prompt me if I want to create a new revision. And now you see I've created version 1.1 of my model.