Models

A model is a representation of a database catalog that you can use to make changes to the catalog. A model can be stored in memory or in the local file system.

Models make changing a database easy because you can make changes without having to remember complex SQL. In addition, DB2® Change Management Expert provides a variety of user interfaces, depending on the task.

Instead of making changes directly to a DB2 catalog, you make changes to models. You use models to plan changes to a database, analyze the impact of the changes, and then deploy those changes to the actual database. You can also use models to identify the differences between databases and move those differences from one database to another database.

DB2 Change Management Expert uses several types of models:

As an example of how models are used, assume that you want to increase the length of a column and drop a column in a particular table in a development database. You can create a deployment script to handle the change. When you create a deployment script, the Deployment Script wizard creates a base model and a target model of the development database. You can then change the target model to increase the length of a column, to drop a column, and to generate the change commands to create the DDL that you will use to change the actual development database. The change commands will be based on the differences between the base and target models (the before and after representations of the development database).

As another example, assume that you made some changes to the development database and now want to migrate those changes to the test database. You can create a model of the development database, which will be the source model for your changes to the test database. You can then create a deployment script to handle the changes to the test database, which also causes a base and target model of the test database to be created. You can then compare the development database model (the source) to the target model of the test database and move the changes from the development database model to the target test database model. Finally, you can generate the change commands to create the DDL that will change the actual test database. These change commands will be based on the differences between the base model of the test database and the target model of the test database, which you changed by moving over differences for the development database).

Related concepts
Impact analysis
Model comparison and synchronization
Migration analysis
Working with the deployment script
Related tasks
Managing project resources
Working with models from the Deployment Script Editor


Feedback

Copyright IBM Corporation 2006, 2007. All Rights Reserved.