Abstract
Compared with web, multi-tier applications, mobile applications have common and specific requirements concerning data persistence and processing. In mobile apps, database features can be distinctly analyzed for the client (minimalistic, isolated, memory-only) and the server (data rich, centralized, distributed, synchronized and disk-based) layers. Currently, a few lite relational database products reign the persistence for client platforms of mobile applications. There are two main objectives of this paper. First is to investigate storage options for major mobile platforms. Second is to point out some major differences between SQL and NoSQL datastores in terms of deployment, data model, schema design, data definition and manipulation. As NoSQL movement lacks standardization, from NoSQL products family MongoDB was chosen as reference, due to its strengths and popularity among developers. PostgreSQL serves the position of SQL DBMSs representative due to its popularity and conformity with SQL standards.Keywords: Mobile Applications, NoSQL, SQL, PostgreSQL, MongoDB1 IntroductionMobile world is one of the most dynamic areas of Information Technology today. Smartphones and tablets explosion have created a huge market for mobile applications. Consequently there is an increasing demand for mobile application developers so that, even when taking into account just the case of Romania, many books [1] [2] [3] and articles (e.g. [4], [5], [6], etc.) have been published. Also many Business Information Systems/Business Informatics undergraduate and master programs introduced in their curriculum courses related to mobile devices and applications (e.g. http://dice.ase.ro/?page_id=31, http://ism.ase.ro/ curriculum_2012_2014.jsp, http://www.feaa.uaic.ro/ro/main/page/335, http ://www. econ.ubb cluj.ro/planuri_invatamant/master/planuri_m aster_2012_2013/E-Business.pdf).Almost all of the mobile applications require a persistent data layer, including options for queries. So the interest of database professionals, academics and researchers for mobile technologies is increasing. Mahmoud et al. [7] even suggest including mobile storage topics, devices and applications into database courses.This paper presents technologies and tools for deployment of the data layer in mobile applications on some major platform focusing on a NoSQL datastore, MongoDB. Section 2 deals with some specific requirements of mobile software in terms of storage and databases. Section 3 deepens the discussion of data storage features for major mobile platforms. The arguments for a NoSQL solution, including a basic description of mobile cloud solution implemented in MongoDB are subjects of section 4. Sections 5, 6 and 7 analyse some of the main differences in terms of database schema, Data Definition Language (DDL), Data Manipulation Language (DML) and database query between SQL (PostgreSQL dialect) and MongoDB.2 Common Issues of Mobile Applications Storage LayerMobile applications share many features of client/server or web multi-layered applications architecture. Figure 1 depicts a classical six-layered (Security layer covers all the other five layers) framework [8] for enterprise mobile application development.Persistence layer have similar requirements in terms of storage, DDL, DML and database query. Also the data accessibility mechanisms from application layers are similar to other web applications.The most striking difference between mobile and web application databases concerns is that while server persistence layer is similar, the client platforms of mobile apps (running mainly on smartphones and tablets) have a smaller scale of available resources (memory, processing power). Many mobile applications require replication and synchronization mechanisms for data persistent on smartphone with a centralized large scaled database available on a server [9] [10], Data storage for client must be processed without hard disk techniques [11] [12],Nori [13] identifies 11 characteristics that have to be provided, partially or fully, by the mobile and embedded DBMSs:a. …
Highlights
Almost all of the mobile applications require a persistent data layer, including options for queries
This paper presents technologies and tools for deployment of the data layer in mobile applications on some major platform focusing on a NoSQL datastore, MongoDB
For example, attribute address must be renamed into postAdress, in SQL that has been possible through ALTER TABLE (PostgreSQL syntax): ALTER TABLE customers RENAME COLUMN address to postAddress; In MongoDB, prior to version 1.7.2, renaming operations had to be done "manually" for each document in collection: db.customers.find().forEach( function (x) { // declare new property which gather the value of an existing property x.postAddress = x.address ; // remove old property delete x.address; // save the updated document db.customers.save(x);
Summary
17), MODE_WORLD_WRITEABLE for open write access to others ( deprecated starting with API level 17) and . In order to create a database, some information needs to be provided: database name, data center provider (we choose Amazon, an EU Ireland instance based on proximity criteria), the instance type (depending on the storage capacity needed), a new username and password for connections. MongoLab allows the users to clone any already created database using its interface or any other accessible in the cloud. The following operations are performed using the mobile application: the user connects to the cloud database, across the network; the user retrieves all students from a collection, based on their group number; adding a new grade (for a student); getting the average grade for each group of students. Connection to the cloud based MongoDB instance using the Android SDK requires the provided standard URI, username ( professor1) and password (education): MongoClient mongoAndroid = new MongoClient( "mongodb://professor1:education>@ds061807. “'Student ID' : ‘SL31040701445’}”; DBObject dbgenericObject (DBObject)JSON.parse(cText); Grades.insert(dbgenericObject);
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have