(Show Contents)
Schema Change Wizard
Specifying How the Schema Change Wizard Works
After starting the Schema Change Wizard, you will need to answer a series of questions that determine how the update will take place.
The first choice is how the wizard will apply the changes. You must decide if you want the system to:
- Execute changes immediately on the current database. This option makes the changes immediately on the current database without any intermediate steps. This option is most often used when the changes are small and well understood. The only way to "undo" this type of change is to restore the database from a backup or manually restore the database to it's previous configuration.
- Output the changes to an SQL Script. This option is generally used when the schema changes are significant or when you want to review the specific changes that will be made to the physical database before they are made. Typically, you will choose the SQL script option when:
- you are updating mission-critical databases on which round-the-clock business processes depend. These databases do not allow downtime during which to make changes.
- changes must be pre-vetted on a staging server.
- changes need to be applied to multiple project databases.
The next decision is the type of change the wizard should make:
- Re-create tables from scratch. This option completely wipes out the current table and re-creates a new table using the information in the ARCHIBUS data dictionary. Choose this option if you want to:
- rename columns (You can also accomplish this using option can be accomplished also by selecting “Alter table” option.)
- get rid of deleted columns
- re-create indexes
- reorganize columns, for example: list columns in the same order as in the ARCHIBUS schema
- Alter existing table structure. This option leaves the physical table in place and adds or modifies column definitions. It will not delete columns that have no corresponding entry in the ARCHIBUS data dictionary. Consequently, this option allows your physical database to differ from the conceptual definition in ARCHIBUS. This may be desirable when the physical database contains columns that are not used by ARCHIBUS or your extensions. On the other hand, having the data dictionary consistent with the physical database is desirable for ease of maintenance.
The third parameter tells the wizard which tables to update.
- All tables with changes in the data dictionary made by the Database Update Wizard. In order to use this option, you first need to compare the ARCHIBUS data dictionary containing your changes and the physical SQL tables in the database. This comparison is performed when you import data dictionary tables using the Database Update Wizard. See Performing the Data Transfer: Merge Data Dictionary Tables.
- Tables like: With this option, you can name specific tables (separated by semicolon) or groups of tables using the % wildcard specification. For example, the table specification
bl; fl; rm%; em%
changes the bl table, the fl table, all tables that begin with rm, and all tables that begin with em.
Finally, there are two check boxes:
- Include all validating tables. This option includes all validating tables for any table listed in the"Tables like" option. For instance, if you name the Rooms (rm) table, this option will add not only the validating tables specified for fields in the Rooms table, but will also include tables for validated fields in the Buildings table and validating tables for the validated fields of the Buildings table, and so on. Entering the Rooms table and setting this option results in a list of more than 50 tables.
- Re-create all foreign key constraints into or from the tables. In cases where the structure of the table is changing, the Schema Change Wizard automatically drops and re-creates the constraints. This option is useful when the only change is that you have added or changed a validating table or fields to validate.
Next
Click on Compare and Next to Update the SQL Tables with Database Dictionary Changes.