Introducing Cloudsync
Page 3 of 8

Process Overview

This section provides a high-level summary of the steps involved in creating a synchronized system. The remaining chapters of this guide discuss aspects of synchronization more specifically, and should be consulted for in-depth information about each phase of this process.

A synchronization system consists of one source database and one or more target databases. Basically, setting up the source and target databases consists of these steps:

  1. Create the source database. Target databases will contain a subset of the sources's database objects (including work units) and can also contain database properties. Database objects are sometimes also called dictionary objects. They are user-defined entities such as tables, indexes, constraints, views, stored prepared statements, aliases, and work units.
  2. Create/generate the objects necessary to create the target (a publication and a copy file).
  3. Create a target database using the copy file.

Following is a brief description of the steps:

  1. Create the source database

    The source database is the master database for a synchronized system, and is designed to receive updates from one or more external target databases. Source databases are created using the createSource=true attribute. Standard databases can be converted to Source databases using the convertToSource=true attribute.

  2. Optionally, write update logic and create a Work Unit alias

    A work unit alias references a method containing logic to apply during refreshes. Work unit aliases are created at the source database, but they can specify different logic for the source and target. If you want to use a work unit at the target, it must be have been created prior to the publication (next). To create a work unit alias, use the CREATE WORK ALIAS statement (or use Cloudview).

  3. Create a Publication object

    A Cloudsync publication is created at the source database, and can be thought of as a kind of database-level view. Publications are treated as database objects, and are stored with the source database. A publication specifies which source database objects and data (and, optionally work unit update logic) you want to include in the target database. It can also include database properties. Use the CREATE PUBLICATION statement to create a publication.

  4. Generate a copy file (from the Publication)

    The copy file will be used to create the target database in the next step. After you have created a publication, use the COPY PUBLICATION statement to generate a copy file from it.

  5. Create a target database

    A target database is always created using a copy file. In fact, a database created as a target does not allow explicit DDL statements. To create a database, use the createTargetFrom=copyFileName attribute on the database connection URL (or use Cloudview). You can create multiple target databases from a single copy file, or you can use a different copy file for each target database.

For detailed discussions of setting up synchronized systems, see Chapter 3, "Creating a Synchronized System", and Chapter 7, "Designing Synchronized Applications".