Book a Demo

Author Topic: Transform DB schema to "official" Informix support  (Read 4294 times)

Damir

  • EA User
  • **
  • Posts: 84
  • Karma: +0/-0
    • View Profile
Transform DB schema to "official" Informix support
« on: June 23, 2010, 04:30:41 pm »
Hi
We've started modeling an Informix database in EA prior to official support for Informix in EA. We created our Database datatypes for Informix and named the Informix database in EA project as Informix 7.0. After a year or two, Sparx offered support for Informix database, naming the database Informix. We started using the supported version for further modelling.
Problem: "Informix 7.0" and "Informix" tables cannot be related with foreign keys because EA recognizes them as tables from different database systems. We need to transform "informix 7.0" tables to "informix" tables. There are almost 900 of these tables.
Question: What would be the right way to do this?
I've tried with a JScript which generaly does following:
Code: [Select]
var tablice = Repository.GetElementsByQuery('informix7.0','');
      
      
      for ( var i = 0 ; i < tablice.Count ; i++ )
                  {
                        var tablica as EA.Element;
                        tablica = tablice.GetAt( i );
                        
                        tablica.Gentype = 'Informix';
                        tablica.Update();
                        tablica.Refresh();
                        
                        tablica = null;
                  }
      
This works pretty well but I have follwing problems/questions:
- I'm not sure this leaves the data in a consistent state regarding column datatypes of those tables
- I've modelled Informix VARCHAR type in our first implementation of Informix support with precision and scale (in order to model column definitions such as client_name VARCHAR(30,8). There is no support for this in official Informix support? One can only define the previous example as client_name VARCHAR(30)?

Many thanks!
Damir

pH

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Transform DB schema to "official" Informix sup
« Reply #1 on: August 05, 2010, 09:31:28 pm »
Damir,

Why do we need a script? Would it not work if you just try transfering the data from your initial database into EAP file and then connect to new database and transfer the data to DBMS?

thx,
pH
<a href="http://webuml.org"><img src="http://webuml.org/images/webuml-badge.png" alt="Set UML Free!" style="border-width:0"></a>

Damir

  • EA User
  • **
  • Posts: 84
  • Karma: +0/-0
    • View Profile
Re: Transform DB schema to "official" Informix sup
« Reply #2 on: August 09, 2010, 04:28:38 pm »
hi pH
- you loose data description from current model
- the data in dbms does not contain "logical" connections modeled in the model. It does not contain FK-s (hundreds of them) which are implemented in the application layer and modeled in the data model.
- the model contains actualy a superset of several "instances" of the database. there is no such real database with all the details that could be "sucked in" in UML data model.