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

SAP Sybase SQL Anywhere 16.0 » UltraLite - Database Management and Reference » UltraLite overview

 

CustDB sample application overview

The CustDB sample is installed with SQL Anywhere. It is a multi-tiered database management solution that implements MobiLink synchronization with a SQL Anywhere consolidated database.

CustDB consists of the following:

  • A consolidated SQL Anywhere database. The database is pre-populated with sales status data.

  • A remote UltraLite database. This database is initially empty.

  • An UltraLite client application.

  • MobiLink server synchronization scripts.

Note

You can only run one instance of CustDB at a time. Trying to run more than one instance brings the first instance to the foreground.

CustDB allows sales personnel to track and monitor transactions and then pool information from two types of users:

  • Sales personnel that authenticate with user IDs 51, 52, and 53.

  • Mobile managers that authenticate with user ID 50.

Information gathered by these different users can be synchronized with the consolidated database.

Both the consolidated and remote databases contain a table named ULOrder. While the consolidated database holds all orders (approved and those pending approval), the UltraLite remote database only displays a subset of rows according to the user that has authenticated.

Columns in the table appear as fields in the client application. When you add an order, you must populate the Customer, Product, Quantity, Price, and Discount fields. You can also append other details such as Status or Notes. The timestamp column identifies whether the row needs to be synchronized.

The synchronization logic for CustDB is held in the consolidated database as MobiLink synchronization scripts. Synchronization logic allows you to determine how much of the consolidated database you need to download and/or upload. You can download complete tables or partial tables (with either row or column subsets) using such techniques as timestamp-based synchronization or snapshot synchronization.

You can use Sybase Central to browse the synchronization scripts that are stored in the consolidated database. Sybase Central is the primary tool for adding scripts to the database.

The custdb.sql file adds each synchronization script to the consolidated database by calling ml_add_connection_script or ml_add_table_script. Connection scripts control high-level events that are not associated with a particular table. Use these events to perform global tasks that are required during every synchronization. Table scripts allow actions at specific events relating to the synchronization of a specific table, such as the start or end of uploading rows, resolving conflicts, or selecting rows to download.

 SQL Anywhere CustDB database
 The UltraLite CustDB database
 RDBMS-specific build scripts
 UltraLite CustDB client applications and ReadMe files
 Synchronization logic
 See also

CustDB file locations