TOP

reverse.db

Description

Reverse engineer a database schema and represents its tables, fields, relationships as classes, attributes, associations in a UML 1.3 model. This task implements reverse engineering logic for database schemas and storing the results as UML 1.3 objects. The model produced is in fact a Platform Specific Model, which might need additional processing and tuning.

Usage:

   <reverse.db
     url="jdbc:oracle:thin:&atlocalhost:1521:vegas"
     user="..."
     password="..."
     driver="oracle.jdbc.driver.OracleDriver"
     schema="..."
     output="..."/>
 
The class is not thread safe

Conventions for the model produced:

  1. The database column types are converted to DataType instances named: <type name>[_<column size>[_<column precision>]]. Additionally as tagged values named TAG_VALUE_DATA_TYPE_SIZE and TAG_VALUE_DATA_TYPE_PRECISION these values are bound to the concrete data type.
  2. The TAG_VALUE_DATA_TYPE_PRECISION tagged value is optional. When not provided, the precision should be treated as 0
  3. The TAG_VALUE_DATA_TYPE_SIZE tagged value is mandatory.
  4. Any comments found while reverse engineering the database are bound as 'documentaion' tagged values. These tagged values are compatible with the Rose's approach to documentation. They are optional.
  5. Each attribute created might have TAG_VALUE_NULLABLE tagged value assigned. When provided it contains 'false' to indicate attributes that cannot be null. True values are not provided.
  6. Each attribute pertaining to the table's primary key is bound a 'primary_key' tagged value Its value is the sequence order of the column in the tible's primary key.
This task shuts down the models repository, so any further processing of models in the same JVM process becomes impossible. If one would be needed, do it in a separate run.

Implementation class

net.mdatools.modelant.uml13.reverse.task.ReverseEngineerDatabaseTask

Parameters

Attribute Description Type
driver The database driver class of the to reverse engineer String
output The name of the output file to write the model to File
password The database user's password to connect the database to reverse engineer String
schema The database schema to reverse engineer. Recommended is to provide the schema/user name in UPPERCASE in order to retrieve properly the JDBC metadata. String
url The database URL of the to reverse engineer String
user The database user to connect the database to reverse engineer String
work The directory of the work/temp files File

Use <typedef resource="net/mdatools/modelant/uml13/reverse/antlib.xml"/>
Documentation generated by ant.doc Ant macro from ModelAnt by MDA Tools