Patching Design Changes to Database
Information systems keep changing at all time. Very often, those changes involves the introduction of new business rules, which requires storing new data, and thus requires the introduction of new database tables, columns and relationships. Since database is an integral part of an information system, to modify database structure we cannot just throw away the old one an re-create everything from scratch. Instead, we need to take good care of existing data and structure to ensure the system will remain working properly both throughout and after the transition.
Visual Paradigm supports the patching of design changes to existing database. We compare the differences between your design and a database, and patch the differences to your database accordingly. Throughout the process, your existing data will remain intact. You don't need to worry about data lost or system stability.
Patching Database from ERD
- Select Tools > DB > Generate Database... from the toolbar. This opens the Database Generation window.
Database Generation window
- Select Update Database for Generate Database.
- Check and/or uncheck Export to database and Generate DDL. Sometimes, you may want to review and modify the DDL scripts for database patching, instead of having the database be altered completely based on your updated design. If this is what you want, uncheck Export to database and check Generate DDL. If you want database to be patched automatically based on your ERD, check Export to database.
Select Export to database
- You can check Include drop table/columns that not exist in ER model if you want the patching process to drop tables and/or columns that do not exist in your ER diagram. Note that dropping a column or table will disregard the data contained. Therefore, think carefully if you want to enable this option.
- Make sure you have chosen and configured the default database. You can only patch database if you have chosen the default database.
Default database specified
- Configure the other generation options. Read the next sections for details about those available options.
- Click OK. If succeed, and if you have chosen Export to database, you will see the database be patched. If you have chosen Generate DDL, you can find the DDL file in the folder specified in the Output Path field.
Overview of Database Generation
|Database Generation window
|Overview Database Generation|
The following resources may help you to learn more about the topic discussed in this page.
|3. Generating Database from ERD||Table of Contents||5. Copying SQL Statements from Entities in ERD|