Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Creating and Configuring UltraLite Databases » Creating UltraLite databases » UltraLite desktop creation

Creating an UltraLite database from a MobiLink synchronization model Next Page

Creating an UltraLite database from a SQL Anywhere reference database

A reference database is a SQL Anywhere database that serves as a template for the UltraLite database you want to create. Your UltraLite database is a subset of the columns, tables, and indexes in this reference database. You select these objects as part of a publication in the reference database.

In previous versions of UltraLite, a reference database was required by some modes of development. Now, unless you are using the SQL Anywhere database as a consolidated database to collect and manage data from multiple remote databases, there is no clear development advantage to using this method—unless you want to first model your data with an architecture tool like Sybase's PowerDesigner Physical Data Model.

You can initialize an UltraLite database with the ulinit utility for UltraLite. With this utility, you can include utility options to specify different properties for the database.

To initialize/extract a new UltraLite database from a reference database (command prompt)
  1. Create a new SQL Anywhere database.

    You can either create a new one with the dbinit utility or use Sybase Central. You can also create a SQL Anywhere database from non-SQL Anywhere databases, by migrating data from these third-party files.

    Set database properties with UltraLite usage in mind    The UltraLite database is generated with the same property settings as those in the reference database. By setting these options in the reference database, you also control the behavior of your UltraLite database. These options include:

  2. Prepare the reference database by adding objects required by the UltraLite database.

    Performance tip

    If your UltraLite applications frequently retrieve information in a particular order, consider adding an index to your reference database specifically for this purpose.

  3. Run the ulinit utility, including any necessary options.

    For example, to initialize an UltraLite database called customer.udb with tables contained in two distinct publications, enter the following command line at a command prompt. Specifically, Pub1 may contain a small subset of tables for priority synchronization, while Pub2 could contain the bulk of the data.

    ulinit -a DBF=MySource.db 
    -c DBF=customer.udb -n Pub1 -n Pub2 
See also