Skip to main content
    Country/region [select]      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

IBM developerWorks : IBM developer solutions : IBM developer solutions articles
Extending enterprise data to mobile devices
319KB e-mail it!
DB2 Everyplace component overview
DB2 Everyplace database
Query-By-Example (QBE)
DB2 Everyplace Sync Server
How synchronization happens
DB2 Everyplace security functions
DB2 Everyplace Sync Server connectivity
Personal Application Builder
About the author
Rate this article
Related content:
Subscribe to the developerWorks newsletter
More dW IBM developer solutions resources

Angela Noether (
e-business Architect, IBM
November 2000

DB2 Everyplace is a relational database designed for Personal Digital Assistants (PDAs), handheld personal computers, and embedded devices. In this article, we introduce you to DB2 Everyplace and its mobile computing support. To understand how mobile devices can exploit enterprise data, let's look at an example of an information technology worker dealing with constantly changing inventory data. Alex, our fictional information technology worker, works for the BIG-A skateboard company that distributes skateboards throughout the southwestern United States. He monitors the inventory of retailers that carry the BIG-A skateboard product line and orders products when they are needed. For the past several years, Alex had to go back to the company and enter data by hand.

Figure 1. Palm OS device with wireless OmniSky cellular modem
Figure 1

As inventory grew and orders became more complex, the BIG-A skateboard company gave Alex a Palm V with an OmniSky wireless modem as shown in Figure 1. The company built an application using DB2 Everyplace and the DB2 Everyplace Personal Application Builder; now Alex loads the catalog into his Palm V, places orders from a list, and transmits his orders from his PDA to the BIG-A headquarters. He can view inventory, place orders, and update information anytime from anywhere, and he can immediately synchronize the data on his PDA with the company's computer system using the wireless connection. The application and the rich functionality of DB2 Everyplace greatly increases his efficiency by keeping him up to date on customer inventory level and order status.

IBM DB2 Everyplace V7.1.1 is part of IBM's solution for mobile computing. With DB2 Everyplace, mobile professionals, such as sales people, inspectors, auditors, field service technicians, doctors, realtors, and insurance claim adjusters can access vital data they need while away from the office.

The DB2 Everyplace solution consists of the following components:

  • DB2 Everyplace database - a relational database system designed for small handheld devices
  • DB2 Everyplace Sync Server - a bidirectional synchronization server that moves data between the DB2 Everyplace database and existing enterprise databases
  • DB2 Everyplace Personal Application Builder - a rapid application development tool for creating DB2 Everyplace applications running on handheld devices

DB2 Everyplace component overview

Figure 2. How the DB2 Everyplace components interact with each other
Figure 2

DB2 Everyplace database
Mobile and embedded devices are designed with application-specific hardware designs for accomplishing specific tasks, as opposed to the more general nature of personal computers. The DB2 Everyplace database is specifically designed for the mobile and embedded application environment. The DB2 Everyplace database engine supports basic SQL and relational operations, such as Join, Group By, Order By, multiple column Primary and Foreign Key, Expression functions, Aggregate functions, and Constraints. Advanced indexing provides a noticeable query performance boost for medium to large DB2 Everyplace tables. Scrollable cursors enable easier application data manipulation.

To maximize utility using the least amount of resources, only the most relevant functionality for mobile databases has been included. Enterprise database functions, such as subqueries, creating views, triggers, stored procedures, and user-defined functions, are not included.

The database engine supports Single Byte Character Sets (SBCS), Double Byte Character Sets ( DBCS), and UNICODE, where available. The following languages are currently supported: English, French, German, Italian, Japanese, Korean, Spanish, Traditional Chinese, and Simplified Chinese.

DB2 Everyplace supports database application development in C/C++ and Java™ language. The DB2 Call Level Interface (CLI) for Open Database Connectivity (ODBC) and Java Database Connectivity (JDBC) standard interfaces are available.

DB2 Everyplace database is available for Palm OS, Windows CE/Pocket PC, Psion EPOC, embedded Linux, and QNX Neutrino.

Having a compact relational database on a mobile device enabled the BIG-A Skateboard company to rapidly deploy their inventory and ordering applications on a mobile platform. The small size of DB2 Everyplace allows Alex to hold a lot of data. This data can be synchronized using the DB2 Everyplace Sync Server.

Query-By-Example (QBE)

Figure 3. QBE table view
Figure 3

Query-By-Example is provided with the DB2 Everyplace database to use on the client. Figure 3 shows how you can use QBE to view the data in DB2 Everyplace tables. Scroll through the data in the tables using the scroll bars on the screen or the up and down buttons on the mobile device. With DB2 Everyplace V7.1.1, you can view single records using the record view. You can use QBE to update data, insert new data, or delete data from the tables of a DB2 Everyplace database. The more advanced user can use the QBE command-line processor (CLP) to enter and execute user-specified SQL statements. Figure 4 shows using the QBE command-line processor to select names beginning with the letter "L" from the PHONEBOOK table.

Figure 4. QBE command-line processor
Figure 4

Application developers at the BIG-A Skateboard company use QBE to create tables on the device and test their mobile database applications functionality. QBE makes viewing the databases on the device easier during development.

Changes that you make to the data are reflected in your enterprise database only after you synchronize the data using the DB2 Everyplace Sync Server.

DB2 Everyplace Sync Server
DB2 Everyplace Sync Server synchronizes data from the enterprise with the mobile DB2 Everyplace database on the device. The Sync Server architecture consists of:

  • IBM Sync client on the mobile or embedded device
  • DB2 Everyplace Sync Server
  • Enterprise data sources

The IBM Sync client communicates with the DB2 Everyplace Sync Server, and the DB2 Everyplace Sync Server communicates with enterprise databases. DB2 Everyplace Sync Server is available for Windows NT® DB2 Everyplace Sync Server for AIX, Linux, and Solaris are in beta. The IBM Sync client is available for Palm OS. The IBM Sync client for Windows CE/Pocket PC, Psion EPOC, embedded Linux, and QNX Neutrino are currently being tested.

Synchronization architecture

Figure 5. Synchronization architecture
Figure 5

Figure 5 shows an overview of the design of the DB2 Everyplace Sync Server. The blue pieces are the synchronization engines, one on the server and one on the mobile device. Orange represents the pluggable adapters for data sources. Purple is the user interfaces, and the grey cylinders are the data sources. There are also several API layers in the design to allow for easy extension and programmatic access to the architecture.

The Sync Server portion of the architecture is built around a SyncML-based synchronization engine. SyncML is an industry initiative sponsored by several companies, such as IBM, Lotus, Nokia, Palm, Psion, Motorola, Starfish, and Ericsson. SyncML-based products are designed to be interoperable with each other, using a standardized markup language and synchronization framework for synchronizing and replicating data between devices.

The SyncML-based synchronization engine is extended to data sources using a pluggable adapter framework with a simple API. The Sync Server Adapter API will be published soon so other companies can develop custom adapters to access their custom data sources. Currently, a DB2 Universal Database (UDB) adapter using DataPropagator technology is available. Microsoft Exchange, Lotus Domino, and JDBC database adapters are in development.

The synchronization engine communicates with synchronization clients using a Java servlet. Wireless Application Protocol (WAP) binary encoded XML (WBXML) is used to communicate the synchronization messages. The WBXML specification defines a compact binary representation of the eXtensible Markup Language (XML). The binary XML content format is designed to reduce the transmission size of XML documents, allowing more effective use of XML data on narrowband communication channels.

Figure 6. Mobile Devices Administration Center (MDAC)
Figure 6

The Sync Server is managed using the MDAC user interface shown in Figure 6. The MDAC allows you to define synchronization for groups of users who have the same needs for access to applications and data. The MDAC makes it easier to handle multiple users, because you can define data to be replicated for a group of users, yet make some adjustments to the replication definition for individual users as necessary.

The MDAC allows the BIG-A database administrators an easy-to-use administration console similar to the DB2 UDB Control Center. The MDAC provides centralized administration of all of BIG-A's mobile users, lowering the cost of maintaining the system.

The IBM Sync client on the mobile device also uses an extensible architecture. It is built around a small synchronization engine extended using client data adapters to access data sources. Currently, client adapters are available for DB2 Everyplace relational data and file data. A Personal Information adapter (address books, calendars, and others) is in development. In addition to client data source adapters, transport adapters can be added to enable communication over many different network types. Currently, IBM Sync uses HTTP over Transmission Control Protocol/Internet Protocol (TCP/IP) to communicate.

The IBM Sync client provides APIs to access synchronization functionality directly from a program using the IBM Sync Engine API. New client data adapters can be developed using the Client Adapter API as well as new transports using the Transport API.

The IBM Sync user interface provides menus to configure the location of the Sync Server, what data subscriptions you want to synchronize, and username and passwords to access the server. To synchronize data, the user simply taps the Sync icon on the display and synchronization begins. Status messages provide user feedback about the progress of the synchronization.

How synchronization happens
The following scenario describes how DB2 Everyplace Sync Server synchronizes relational data between the DB2 Everyplace database and a DB2 Universal Database system:

Sync from client to server

Figure 7. Sync from client to server
Figure 7

When a user updates data on the mobile device, the information is synchronized during the next sychronization session. The following steps walk through how information from the mobile device is synchronized with the enterprise data. These steps correspond with the numbers in Figure 7:

  1. The user initiates synchronization by tapping the IBM Sync icon. alternatively, synchronization can be requested automatically by an application using the IBM Sync Engine API. IBM Sync sends a synchronization request to the Sync Server.
  2. The synchronization request is authenticated and then placed on the input queue of the Sync Server. The synchronization client software on the device waits for a synchronization reply from the source server.
  3. After the synchronization request is received by the Sync Server on the mid-tier system, the username and password that the client provides are authenticated against the administration control database to verify that the client is a valid Sync Server user.
  4. The data is placed into a staging table. Staging tables help improve throughput capacity of synchronization requests because changes can be staged while other updates are taking place.
  5. The data is copied from the staging table to the mirror table (M_ECCATALOG in this example), and potential update conflicts are resolved. Changes to the mirror table are recorded in the DB2 log.
  6. The DB2 DataPropagator Capture program captures changes to the mirror table from the DB2 log and writes them to a change data table.
  7. The DB2 DataPropagator Apply program applies changes from the change data table to the source table, ECCATALOG.

Sync from server to client

Figure 8. Sync from server to client
Figure 8

Changes to data in enterprise data sources is transferred to the mobile device during synchronization. The following steps walk through how information from the enterprise is synchronized with the client. These steps correspond to the numbers in Figure 8:

  1. The DB2 DataPropagator Capture program, running continuously on the source system, captures changes to the ECCATALOG source table from the DB2 log and writes them to the change data tables.
  2. The DB2 DataPropagator Apply program applies changes from the change data table to the mirror table, M_ECCATALOG. Update conflicts might be identified and resolved during this step of the process.
  3. The changes to data are sent to an output queue on the mid-tier system as a synchronization reply message.
  4. The synchronization client software retrieves the synchronization reply message from the output queue.
  5. The changes to data are applied to the client's local copy of the table. The synchronization session ends.

DB2 Everyplace security functions
Security is important to protect confidential information between the client and the server. DB2 Everyplace allows the specification of a group of users accessing applications, file downloads, and data subscriptions. The username and password are authenticated during synchronization. The source database is protected against device users making changes based on the user privileges for insert/update/delete of the data. DB2 Everyplace uses HTTP for transporting the data for synchronization, so a firewall and a special port can be set up for synchronization purposes.

In the future, DB2 Everyplace will provide Secure Sockets Layer (SSL), certificate authentication, and encryption of local data. SSL also performs server authentication using a server certification so that any information cannot be sent to an impersonating server.

The BIG-A database administrator only provides data subscriptions to Alex that he is authorized to access. There is no way for Alex to access information that has not been defined for him. This means intruders also have no way to access your sensitive database from the Sync Server. Sync Server users can only access the data subscriptions they are assigned. Access is protected using a username and password for each user.

DB2 Everyplace Sync Server connectivity
DB2 Everyplace Sync Server connectivity includes wired and wireless communication. In today's diversified wireless market, there are several options for making a mobile connection:

Figure 9. DB2 Everyplace Sync connection options
Figure 9

Starting from the bottom left corner of Figure 9 and proceeding clockwise, you see the following connection options:

  • Mobile device with a modem connecting to a Plain Old Telephone Service (POTS) line connecting to an Internet Service Provider (ISP) connected to the Internet.
  • Mobile device using a serial cable, cradle, or infrared connection to a PC connected to the Internet.
  • Mobile device with an integrated cellular connection through an ISP connected to the Internet.
  • Mobile device using an infrared or cable connection to a cellular phone connecting to an ISP connected to the Internet.
  • Wireless LAN (802.11b) enabled device connecting to a wireless LAN.

Because DB2 Everyplace use HTTP protocol for transporting data, any wireless communication protocol that runs on TCP/IP works with DB2 Everyplace. Furthermore, users also can use a cable or infrared connection to a wireless phone for synchronization.

Alex's connection is similar to the integrated cellular option in Figure 9. The OmniSky modem is a Cellular Digital Packet Data (CDPD) modem that provides Internet access from anywhere on the cellular network. OmniSky also has a wireless modem for Handspring Visor devices as well.

Personal Application Builder
Personal Application Builder is a rapid application development tool that helps you create applications for mobile devices without writing a single line of code. It supports building applications for small handheld devices that access DB2 Everyplace. Currently, Personal Application Builder supports visual forms creation for Palm OS device, and it provides scripting capabilities for user-defined logic. Personal Application Builder also integrates with other tools for application testing.

Figure 10. DB2 Everyplace Personal Application Builder
Figure 10

Some of the many features included with Personal Application Builder are:

  • Generates stand-alone C applications that access DB2 Everyplace tables
  • Database access without writing any code
  • Form creation directly from database table definitions
  • Rapid prototyping capability
  • Visually edit forms by selecting controls from a palette
  • Global scripting support
  • One-button code generation and compilation
  • Integration with Palm OS and GNU Tools for application compiling, testing, and debugging
  • Complete sample application developed using Personal Application Builder
  • Fully supports relational database
  • Database joins on a single form
  • No Runtime Interpreter or Runtime charges

DB2 Everyplace provides a Visiting Nurse Application that provides an example of how to build a Palm OS application program using the Personal Application Builder.

The BIG-A Skateboard company uses Personal Application Builder to prototype enterprise applications using the existing development staff. The Personal Application Builder is so easy to use that Alex can create new applications to work with the data provided to his device by the DB2 Everyplace Sync Server. This enables Alex to create new views into his data quickly and easily, without the need of support from the development team at BIG-A.

DB2 Everyplace is a compact and robust relational database for the storage and manipulation of data on mobile devices. The Query-By-Example application makes accessing DB2 Everyplace tables easy. Internationalization enables DB2 Everyplace to support many different languages as well as UNICODE. Because most mobile device users are not computer savvy, an important feature is no administration on mobile devices. DB2 Everyplace supports C/C++ or Java application development.

DB2 Everyplace supports industry standard interfaces; existing applications are easily rewritten. It also supports standard database APIs (ODBC and JDBC) and powerful custom APIs (Sync Engine API and Adapter APIs) making mobile enterprise applications easier to develop and deploy.

The Personal Application Builder makes applications easier to write and deploy in the enterprise. It uses XML and XSL to create the application's user interface for multiple devices, no interpreter is needed on the mobile device, and applications are created using compact C code.

DB2 Everyplace Sync Server is extensible using published APIs for the server and client and the whole design is based on the open SyncML framework. The SyncML-based design promotes interoperability among client and server products. DB2 Everyplace supports multiple clients and will support multiple back-end databases in the future.

In our BIG-A example, Alex is a happy distributor, because DB2 Everyplace allows him instant access to inventory and customer information. The solution was created quickly using Personal Application Builder. The data is synchronized and up-to-date thanks to the DB2 Everyplace Sync Server. Alex is now more productive and more profitable in the rapidly changing environment of e-business.

I dedicate this article to Dr. Men-Chow Chiang for his eternally constructive criticism that inspires the best in me. He has my gratitude for his special friendship. Many thanks to IBM Fellow Josephine Cheng who gives me the opportunity to present and discuss DB2 Everyplace. I thank the following people from the DB2 Everyplace developer group for their knowledge and advice: May Wone, Don Clare, Rob Scott, Isaac Cheng, Thanh Pham, Jay Pederson, Patricia Quinn, Edison Ting, Debby Nakamura, Yudong Sun, Sushmita Senmajumdar, Thuan Bui, for their knowledge and advice. Many thanks to David Carew and Nizam Ishmael, Jr., for their support and participation.


About the author
Angela NoetherAngela Noether is an e-business architect in the technical support organization of Developer Relations in Austin, Texas. Her mission is to consult, educate, and provide technical support to IBM customers through webcast or on-site visits. Her areas of expertise include pervasive computing, e-business application framework, and back-end process areas, such as DB2, MQSeries, and so on. She joined IBM over 18 years ago, and she enjoys her work. Her personal hobbies include hiking, traveling, music, meeting interesting people, and raising her two beautiful children. You can reach her at

All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice and represent goals and objectives only.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

319KB e-mail it!
What do you think of this article?
Killer! (5) Good stuff (4) So-so; not bad (3) Needs work (2) Lame! (1)


IBM developerWorks : IBM developer solutions : IBM developer solutions articles
  About IBM  |  Privacy  |  Terms of use  |  Contact