Skip to content
Sahithyan's S3
1
Sahithyan's S3 — Database Systems

Mobile Computing Databases

Mobiles operates in environments with wireless communication, limited bandwidth, and intermittent connectivity.

Consists of:

  • Mobile hosts: laptops, phones, or tablets.
  • Wired hosts: servers or fixed systems.
  • Communication network: Wi-Fi, 4G, 5G, Bluetooth.

Communication can either be:

Applications which rely on a database must handle:

  • Query optimization: minimize data transferred and network cost.
  • Energy consumption: transmission uses more energy than receiving.
  • Location services: queries depend on device location.
  • Data broadcast: base stations broadcast shared data.
  • Disconnection: must maintain cached local data and sync later.
  • Consistency: local copies can become outdated.

Optimization balances:

  • User time: query response delay.
  • Communication cost: data transfer charges.
  • Energy: minimize transmission usage. Reception requires much less energy than transmission.
  • Timing: off-peak vs peak network costs.
  • Base station broadcasts frequently accessed data.
  • Clients listen instead of sending requests → saves power.
  • Supports devices without transmit capability.
  • Broadcasts can be scheduled (fixed or adaptive).
  • Noise or signal loss handled by redundancy (parity bits).

When devices are offline:

  • Local updates may conflict when reconnecting.
  • Cached data may become stale.

Challenges:

  • Recoverability: updates may be lost.
  • Consistency: local data may not match server state.
  • If only one host updates → simple sync.
  • If multiple hosts update → conflicts occur.
  • Version numbering used to track document versions.
  • Sometimes manual reconciliation is required.

Detecting Inconsistent Updates — Version Vector Scheme

Section titled “Detecting Inconsistent Updates — Version Vector Scheme”

Each host maintains a version vector per document.

For host i and document d:

  • Vd,i[k] = version number of d at host k known to i.

Rules:

If all vectors equal → copies are identical. If all Vd,i[k] ≤ Vd,j[k] and not equal → i’s copy is older. If some elements are higher/lower on both sides → inconsistent copies (conflict).

Used in distributed and mobile systems to detect divergence.

  • Automatic merge is complex.
  • Manual resolution often needed.
  • Applied in mobile DBs and distributed file systems.
  • Works if inconsistencies are rare or predictable.

Oracle offers several embedded database products for different scenarios.

  • In-memory RDBMS for real-time, high-throughput applications.
  • Used in telecom, finance, and CRM.
  • Can serve as standalone DB or cache for Oracle DB.
  • Features replication and high availability.
FeatureOracle 10gTimesTen
OptimizationDisk-centricMemory-centric
DeploymentDatabase tierApplication tier
Response timemsµs
Data capacityTBsGBs
  • Open-source, high-performance embedded key–value store.
  • No SQL layer; accessed via API.
  • Runs in-process with the application.
  • Used by Amazon as a high-speed cache in front of Oracle Database.

Key features:

  • ACID transactions.
  • Low latency and high throughput.
  • Minimal hardware requirements.
  • Designed for mobile and field-force environments.
  • Provides secure offline access and syncs when connected.
  • Synchronization: async, event-driven, conflict-aware.
  • Supports automatic reconciliation and device management.

Architecture:

  • Embedded client DB + Mobile server for sync and provisioning.
  • Sync uses In-Queue (upload) and Out-Queue (download) model.
  • Embedded databases run inside applications, require no DBA, and have small footprints.
  • Two architectures: lightly embedded (external engine) and deeply embedded (in-process).
  • Mobile databases face challenges with energy, connectivity, and consistency.
  • Version vectors help detect conflicts after disconnections.
  • Oracle’s embedded solutions—TimesTen, Berkeley DB, and Database Lite—illustrate different deployment and synchronization models.