Q: |
Can I generate SQL or
ODL definitions from an existing database? |
A: |
Yes, the Matisse SDL utility allows you
to reverse engineer the application schema in either a list of SQL
DDL statements or in the ODL (Object Definition Language) syntax.
You can generate a text file containing the SQL DDL class definitions
for the application schema stored in a current database by using
the following command:
> mt_sdl -d mydatabase export -ddl schema.sql
For the same class definitions in the ODL syntax:
> mt_sdl -d mydatabase export -odl schema.odl |
Q: |
Can I update the persistent class definitions without losing all my data? |
A: |
Yes, if an application schema already
exists in the database, only the changes are loaded and saved.
> mt_sdl -d mydatabase import -odl schema-rev2.odl
|
Q: |
The ODL command fails with the 'syntax error near include' error. |
A: |
The Matisse ODL files support pre-processing
directives (for example - #include) that allow you to include other
ODL files.
To use this capability, you must set the MATISSE_CPP environment
variable to the location of a preprocessor. On UNIX, it can be defined
as shown below:
export MATISSE_CPP="`which cpp`"
or
export MATISSE_CPP='"/opt/tools/my compiler/cpp" -DMYVAR=1'
For MS-Windows it can be defined as:
set MATISSE_CPP=cl.exe -E
or
set MATISSE_CPP="C:\<install path>\cl.exe" -E
or to use it from Matisse Enterprise Manager
SET MATISSE_CPP="C:\<install path>\vcvarsall.bat"
x86 && "C:\<install path>\Bin\cl.exe" /E
|
Q: |
How do I get an updated ODL file? |
A: |
You can export the database schema in
ODL format from an online database with the following command:
> mt_sdl -d mydatabase export -odl application.odl
For more information on using the mt_sdl utility, see the Matisse ODL Programming
Guide. |