Comparing Database Schemas Visually

Finding differences between databases is a tedious job. Visual Paradigm provides a "Visual Diff" function for database administrator to compare databases by showing their differences visually. This tutorial shows you how to use visual diff to identify changes of databases from release 1.0 to the latest development version.

September 1, 2009
Views: 57,094
PDF Download

Overview

  1. Make a copy of the current ERD (version 1.0).
  2. Modify the ERD.
  3. Compare the changes from version 1.0 to the latest version.

Here is the database design for the Computer Sales project. We will modify it and then compare it with the original copy.

Computer sales project ERD

Using Visual Diff

  1. Download ComputerSales.vpp. You can also find this file at the bottom of this tutorial.
  2. Open the downloaded .vpp file in Visual Paradigm. To open a project, select Project > Open from the application toolbar.
  3. Let's make a copy of the existing project by selecting Project > Save > Save as from the application toolbar.
  4. Name the new project ComputerSales_1_0.vpp and click OK.
    Save as new project
  5. Reopen the previous project by selecting Project > Open > ..\ComputerSales.vpp.
  6. Make a few changes to the project. Rename the Addresses entity to Customer_Addresses.
    Rename entity
  7. Add a new column to the Computer_Part entity by right-clicking on it and selecting New Column from the main menu.
    New column
  8. Enter discount : number(8, 2) as the column definition, press Enter, and then press Esc to confirm the edit.
    Naming column
  9. Create an entity with a One-to-Many Relationship -> Entity relationship from Computer_Part. Name the entity Part_Usage.
  10. Add the following columns to Part_Usage:
    • +id : number(10)
    • description : varchar2(1024)

    Entity create
  11. Open Visual Diff by selecting Modeling > Visual Diff from the application toolbar.
    Open Visual Diff
  12. In the Visual Diff window, uncheck Use Working Project on the left-hand side.
    Unlock Use Working Project
  13. Click ..., select ComputerSales_1_0.vpp, and then select Computer Sales as the diagram.
    Select diagram
  14. Check Use Working Project on the right-hand side. Select Computer Sales as the diagram on the right-hand side.
    Select diagram
  15. The differences between the diagrams are listed at the bottom of the window.
  16. Select the differences one by one to see the changes.
    • Addresses entity
      Using Visual Diff
    • New column
      Using Visual Diff
    • New associated entity
      Using Visual Diff



Trademark Disclaimer

Oracle is a registered trademark of Oracle Corporation in the U.S. and other countries.