613-518-1166 info@zimdatabases.com

ZIM Development Center (DC) for Zim 7

Zim/SQL Import and Export Utilities

< All Topics

This section of the Development Center enables you to

  • Import definitions from a variety of database servers into your application.

  • Export Zim database definitions to a database server.

  • Compare database definitions in a database server with database definitions in your application. You might do this to check, from time to time, if your Zim definitions are still consistent with the server definitions.

This facility is used when Zim is being used in a client-server configuration. To use this facility you must have a Server Access Module installed for the database server, you must also have enabled the Object Manager, and the server must be running.

To import or compare definitions, select the Tools|Import|Objects|From SQL menu item in DC. To export definitions to an SQL server, select the Tools|Export|Objects|To SQL menu item in DC.

SQL Import Utility

 

 

SQL Definition Import enables you to import database definitions from external servers into your application. When you first select this option, you are presented with a dialog where you must first select the type of server you are importing definitions from. Once you have made your selection, select the Fetch button. Another dialog appears within which you define the connection parameters for the database server. The values required for each parameter depend on which Server Access Module you are using. The Table Owner Name is the name of the server user whose table definitions you wish to import. For some types of servers, this field can be left blank.

Once the parameters have been provided, select OK. A process is run to extract table definitions from the server. You are then presented with a list of all table definitions that you can import. Use the Add, Remove, Add All and Remove All actions to select the specific tables you wish to import. An EntitySet definition is created for each table you import. All objects are created in a Zim directory that you specify as the “Zim Import Directory”. The default import directory is ZIM. The import directory must be accessed in update mode.

If you wish, this facility also creates relationships among these tables by looking for tables that have fields with the same name. The names for these relationships are created by combining the two table names; change these names later. Select the Generate Default Relationships check box to have relationships created. To start the actual creation process, select the Import button.

If you want to only compare current Zim definitions with the table definitions on the server, select the Compare Definitions Only check box.

SQL Export Utility

 

 

The SQL Export Utility is used to export Zim table definitions to a server. When you first select this option, DC locates all EntitySets and relationship with fields and displays the Export dialog. You are presented with a list of all such objects and a list of possible server types to which to export. First, you should select the type of server to which you plan to export. Then, use the Add, Remove, Add All, and Remove All buttons to pick which definitions are to be exported. If you want these definitions to override any that already exist, select the Replace Existing Tables check box. This option causes a DROP TABLE command to be executed on the server before each CREATE TABLE. If you wish to modify the actual SQL commands, select the Modify SQL Definitions check box. When you have made your selections, select the Export button to begin the actual export. You are presented with a server parameter dialog similar to the one presented during the Import operation. Fill in this screen to provide the correct connection parameters for your selected server. A process is run that connects to the server and creates the required tables.

Zim/SQL Definition Comparison

SQL Definition Comparison enables you to compare existing table definitions in your application with definitions on the server. This operation is often performed on a periodic basis, after an Import, to ensure that definitions in Zim and on the server are synchronized. The comparison is done from the SQL Import Utility dialog and uses the ZOMDIFF command. The results of the comparison are displayed using the default editor, or the one you have specified in the editor field.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents