Skip to main content

skip to main content

developerWorks  >  Information Management | Rational  >

Data modeling with InfoSphere Data Architect and Informix Dynamic Server

Accelerate data integration projects and create trusted information assets

developerWorks
Go to the previous pagePage 6 of 13 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
1317 KB (43 pages)

Get Adobe® Reader®


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Enhancing your model then syncing it up with the physical model

At some point in time you may have to enhance your logical model and then move the changes to your physical model. You can do this by simply adding a new logical entity to the logical model and then comparing the model with the physical model. Say you want to change your Bookstore example to be a Library now. In order to do this, you need a new Library entity but want to keep all of the other existing entities. In other words, the new logical model will have Library, Book, Author and BookCategory as the logical entities.

Here are the steps:

  1. Add a Library Entity with two TimeStamp fields — DateCheckedOut and DateDue — to the logical model using the steps described in the previous section.
  2. After that, create a relationship between Library and Book using BookID. As a reminder, highlight the Book entity, and after you see two boxes, drag it from the Book entity to the Library entity.
  3. Transform from a logical to a physical model as described in Step 6 of the previous section. In this instance, however, choose Update Existing Model and click on Browse to pick up the storesLogicalModel.dbm file.
  4. Once that is done, you will see a compare screen like the one shown in Figure 31, below, showing you what the differences are between the two models. From this screen, you can specify what you would like to do with the differences (copy the change or ignore the change). For example, to merge changes from the physical model to the database you can:

    1. Highlight the Library entry.
    2. Use the toolbar (shown circled in Figure 31) to copy over the LIBRARY change from the logical to the physical model.
    3. Click on the Generate DDL button (which is circled in Figure 31) to generate the necessary DDL for the delta change.



    Figure 31. Syncing up logical with physical models
    Syncing up logical with physical models

  5. Once the changes are done, you can go to the physical model and change the column types. Because the TIMESTAMP type gets transformed to a CHAR(10) type (this is the default, and can be changed using the preferences option described below), you can change it to an Informix-specific DATETIME YEAR TO SECOND data type for both the DateCheckedOut and DateDue columns. You can also do this when the transform is taking place as well when the changes are copied over from the logical to the physical model.


Back to top



Go to the previous pagePage 6 of 13 Go to the next page