Fortran Language Educational Consultancy SYS-ED SYSED Computer Education Techniques Programming Language Educational Consultancy SYS-ED SYSED Computer Education Techniques
Mobile Device Database Implementation Database Training Sitemap
Submit Database Questions Knowledge Transfer Database Schedule
Definition of Service Delivery Medium Web-based Training Services
     

Mobile Device Databases

Performance Design

Operational Challenge Mobile Database Systems Mobile Database Implementation
1- Client-side and 2-Offline Development Performance Design Best Practices - Mobile Database
Copyright Acknowledgement

Operational Challenge

A mobile application requires the appropriate selection of database software and development tools, identification and addressing of operational design challenges, and implementation of remote management. Evaluating and integrating free and low cost open source software into the database software stack will be important.

Fundamental decisions associated with mobile database management include network storage and availability. When storing data locally on the mobile device for high availability and fast response times; the tradeoff will be increased power consumption and data concurrency on an enterprise system. Local data storage requires a plan for mobile data management and implementation. In addition to being stored on the device, data will need to be shared with enterprise data or through a web-based service.

When data is being moved and updated by users, it will not be possible to lock the other databases each time a change is made. Fetching over the network and sending updates after the data has been modified or processed; this can be done by HTTP posts to a web service that updates the enterprise system. There will be issues in terms of availability and latency.


Mobile Database Systems

The design objectives associated with a MDS: Mobile Database System are: 1- Availability. 2- Efficient interface and usability. 3- Reliable performance in conjunction with mobility usage. 4- Merge replication for database synchronization with the local database on the mobile device with the central database server. 5- Importing and exporting data to the database server in conjunction with synchronization. 6- Scalability to accommodate synchronization.

The assumption is that use of a MDS with a leading enterprise database affords a minimal risk implementation.

IBM DB2 Everyplace A mobile database with enterprise synchronization for managing data distribution to mobile devices.
IBM Mobile Database A small footprint IBM solidDB data server optimized for mobile use. IBM DB2 Everyplace Applications can be migrated to IBM Mobile Database.
MS SQL Server Compact SQL Server Compact 4.0 database embedded in ASP.NET Web applications which supports the SQL Server syntax and ADO.NET programming model.
Oracle Database Lite Small footprint integrated SQL database software which synchronizes with an Oracle Database server.
 

Mobile Database Implementation

Mobile databases can be designed and coded to use indexes, transaction processing, referential integrity, multi-table joins, row-level locking, SQL functions, BLOB support, and location-based data.

Implementation of a database specific to a mobile device includes:

End-To-End Encryption Security at multiple levels: device theft, device loss, and data interception over the Internet.
Access to Data Mobile applications functioning both connected to the network or offline standalone with a database running on smartphones and synchronizing with the server database.
Device Platform Support Apple iPhone and iPad and Google Android platform are the market leaders.


Client-side Development

There has been a significant increase in web development integrated into mobile applications. There are issues which need to be addressed in terms of design, coding, and user acceptance: 1- intermittent network availability. 2- client-side database storage. HTML5 offers data storage within tables defined with the SQL: Structured Query Language; it is used for storing large amounts of information. There also are localStorage and sessionStorage objects for storing strings of information; it is easier to implement and has fewer restrictions. The tradeoff is storing less information. With persistent storage, information is saved, until it is erased. In session storage, the information is stored specific to the session. All the pages of a website can access information stored in the session up through the closing of the application.

Persistent and temporary storage do not provide facilities comparable to a relational database through SQL. The localStorage and sessionStorage JavaScript objects are used to implement the facilities: 1- The localStorage allows permanent storage. 2- The sessionStorage allows storage in the session. HTML can be used to make a local SQL database available with JavaScript. Once access to the database is established, tables can be created and deleted and data can be inserted, retrieved, and deleted. A JavaScript program can be coded with jQuery Mobile to access data stored in a local database, without accessing a server.


Offline Development

HTML contains the displayed data and the default rendering. The HTML elements of the page are organized in a hierarchy of the HTML DOM: Document Object Model tree. User-initiated events cause a conventional request-response cycle with a page load and the execution of associated JavaScript functions.

The JavaScript element contains the controller functions of the application with event handlers used for binding the JavaScript functions. JavaScript accesses the UI: user interface elements of the HTML DOM tree as data input for processing and presentation to the HTML page. The CSS: Cascading Style Sheet provides the instruction for rendering the HTML page. There are JavaScript/CSS libraries and frameworks for mobile device web applications. The deployment descriptor component is through a manifest file which provides the list of files required to be loaded for an offline web application.
 

Performance Design

In most cases, a mobile version of an application will need to extend the desktop application and translate into customer value and utility for mobile users. The assumption is that the presentation of data will incorporate the execution of business processes within an industry standard development environment:

Xcode - Objective-C Apple iPhone and iPad applications
Eclipse - Java Google Android or BlackBerry application
Microsoft Visual Studio - .Net MS Phone and MS Windows 8 RT


The database and data synchronization infrastructure will need to meet: 1- Front end distributed computing requirements in terms of reliability and performance. 2- Back end requirements to manage data consistency and recoverability. 3- Data will need to be accurate, up to date, secure, and accessible.

Latency for Internet Connections Mobile networks will experience a significantly higher latency than Ethernet-based Internet connections. 1  The general rule is that every tenth of a second delay impacts on customer satisfaction.
Query Processing The mobile-computing model directly affects database query processing. The cost is based on connection time; the economics incentivizes mobile host disconnection for substantial periods.
Routing When one of two hosts is mobile, the route between paired hosts can change. This will have to be addressed at the network level through the database schema and synchronization.
Terrestrial Locations
and WiFi Access
There are terrestrial locations where network availability and transmission are unreliable. It may not be acceptable to wait until WiFi Internet access returns.


Best Practices - Mobile Database

The database schema design needs to enable superior performance of application queries and data integrity.
  • The synchronization infrastructure should transfer changed data only as required by the user.
  • It will need to accommodate upload conflicts, uniqueness requirements, and the downloading of deletions.
  • Each remote database only should contain a subset of the tables and columns in the central database; tables and columns selectively will be synchronized. Other data will be upload-only or download-only.
Conflicts can occur when multiple mobile users update the same data; business logic can be used to manage this problem.
  • Every remote database will require unique primary keys.
  • Each row must have a primary key that is unique both within the database and the entire distributed database system.
When a row is deleted from the central database, the change needs to be synchronized to all the remote databases by:
  • Adding a column to each table that flags rows as “deleted”.
  • Creating a shadow table holding the primary keys of deleted rows.

A plan will be needed for scalability and changes to enterprise database for supporting mobile synchronization:

  • Timestamp columns for indicating the modification date of data rows.
  • Appropriate column defaults.
  • Shadow tables to record transactions.

Due to the mobility of both data and users and frequent disconnection, transactions might have to split computations into sets of operations:

  • Timeout based Mobile Transaction Commitment Protocol uses timeouts to provide nonblocking protocol with restrained communication.
  • Caching is used for improving data access performance and data availability.
  • Replication of data can be used for improving the availability of data, response time, and achieve full offline functionality.
In a synchronization application, only committed database transactions should be synchronized.

Footnote 1:

Google Corporation observed that a half second delay caused a 20% reduced usage in traffic. Experiments by Amazon Corporation with delayed page loading from its data center web site operations indicated that small delays result in substantial and costly drops in revenue.

 
Copyright Acknowledgement
Computer Education Techniques makes no representations of ownership on the software reviewed in this technology assessment. It is aggregating information in the public domain and performing an indepdendent review of mobile devices: hardware, development platform, database, and development tools.
IBM DB2 Everyplace and Mobile Database are registered trademarks of IBM Corporation.
MS SQL Server Compact is a registered trademark of Microsoft Corporation.
Oracle Database Lite is a registered trademark of Oracle Corporation.