Contents Index Setting database options in the reference database Designing your UltraLite database pdf/preface.pdf

UltraLite User's Guide
  Developing UltraLite Applications
    Preparing a reference database

Using an existing database as a reference database


Many UltraLite applications synchronize data via MobiLink with a central, master store of data called the consolidated database. Do not confuse a reference database with a consolidated database. The reference database for the UltraLite application is generally a different database from the consolidated database.

Only an Adaptive Server Anywhere consolidated database can also be used as a reference database. If your consolidated database is of another type, you must create an Adaptive Server Anywhere reference database. Even if your consolidated database is Adaptive Server Anywhere, you must create a separate reference database if you wish to have a different schema or use different settings in your UltraLite application.

You can choose any of the supported ODBC-compliant database management products to create and manage the consolidated database, including Adaptive Server Enterprise, Adaptive Server Anywhere, Oracle, Microsoft SQL Server, and IBM DB2.

If you have an existing Adaptive Server Anywhere database that you will be using as a consolidated database, you could make a copy of it for your reference database.

To create a reference database from a non-Adaptive Server Anywhere database

  1. Create a new Adaptive Server Anywhere database.

    You can use the dbinit command or use Sybase Central. The database must be Java-enabled, which is the default setting.

  2. Add the tables and foreign-key relationships that you need within your application using your consolidated database as a guide.

    You can use a tool such as Sybase Physical Data Architect to re-engineer the consolidated database.

  3. Populate your database tables with representative data from your consolidated database.

    You need not transfer all the information in your consolidated database, only a representative sample. In the early stages of development, you do not need sample data at all. For production applications, you may want to use representative data because access plans of UltraLite queries are based on the distribution of data in the reference database.

For more information on creating reference databases from non-Adaptive Server Anywhere databases, see Migrating databases to Adaptive Server Anywhere.


Contents Index Setting database options in the reference database Designing your UltraLite database pdf/preface.pdf