ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
A Common Interface to Access Structured as
Well as Unstructured Data Stores in Cloud
Environment
Priyanka Waghmare, Manisha Nirgude
M.E Student, Dept. of C.S.E., Walchand Institute of Technology, Solapur, India
Assistant Professor, Dept. of I.T., Walchand Institute of Technology, Solapur, India
ABSTRACT: As the growth of the Internet raises the outsourcing of data also rise exponentially. The outsourcing data might be stored in various databases. Collaborating with these different structured and unstructured databases via a different API (Application Programming Interface) is a challenging task for the developer. The developer must have to be familiar with different API and also it requires more implementation efforts. For each database there is a specific API to interact with it. If the developer wants to interact with different structured and non structured database at a time, then it is a tedious task to connect to each database separately due to the heterogeneity of API’s. The proposed system architecture helps to connect different structured as well as unstructured database with the help of Restful API. It contains an interface which connects to the different structured like MYSQL and unstructured like MONGO and COUCH databases through the API. This system helps to reduce the burden of developer for accessing the structured as well as unstructured databases and perform CRUD operations on databases.
KEYWORDS: NOSQL data stores; unstructured data; structured data; RESTful API; common interface
I. INTRODUCTION
There has been enormous changes taking place in concern to internet growth, recently most of structured databases are changed to unstructured databases. The reason behind this is, due to the innovation and use of many social media. These data which is extracting from different sources are in different form. They are stored in different kinds of databases. Accessing these databases is much complicated because the developer must know all these databases and their specific API. The complexity increases as the connectivity is made to different database. For example to connecting a single database the developer is required to load its driver separately and choose an appropriate API and then perform the different operation.
In the context to the heterogeneity of API, the proposed system implemented a common interface which is uses RESTful API to connect different structured as well as unstructured data stores in cloud. In this system the interface helps to connect to the server and allows performing the different operations on the structured and unstructured databases. An API helps to discover an appropriate database as per developer’s specification and makes connectivity to it. The different operations to the databases are performed through the API. In this system the developer has to specify the operations and the execution is performed as per specification. The system uses different databases like Mongo database, Couch database which are unstructured databases. It will helpful for developer to access such new technology without knowing their specific API which in turn will helpful to reduce the development burden.
II. RELATED WORK
In [1] authors presented a framework for supporting various databases in the cloud. They discover an idea of ODBAPI (Open Pass Database Application Program Interface) which is RESTAPI (Representational State Transfer Application Program Interface) through which it helps to connect different databases. It is useful for accessing structured as well as unstructured databases. This idea helps to reduce the developer’s task by using a single API instead of using a separate API for each single database. They also provide an idea of a declarative way to execute a query on multiple databases.
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
well as unstructured databases through the REST API. Different approaches to integrate data over heterogeneous data models also discussed. It deals with handling the different kinds of databases and also a uniform access to all databases through a single interface is considered.
In [3] authors studied the distributed application requirements in term of multiple-data stores in the PaaS through different possible scenarios. They have analyzed the requirements and presented a combined view of analysis. They described different scenarios related to the way applications use data stores and also defined the data requirements of applications for managing different data stores on a cloud. They presented a model for handling different data stores. They considered different scenarios as structured data store and for unstructured data store and also gives an idea to overcome form that scenarios. The Virtual data store is nothing but a mediator. It allows developer to pose queries against a schema and returns answers from different data stores. They analyzed the development tools that facilitate the integration of heterogeneous information sources that may include both structured and unstructured data.
In [4] authors discoveredas data is generated at an exponential rate, though big data either relational DBMSs or NoSQL DBMSs are in demand and the developer must be familiar with the proprietary API of each type of DBMS. However, these APIs are heterogeneous on different levels. This API heterogeneity creates several problems. So this concept of ODBAPI helps to reduce developers work by my managing different API through a single RESTful API.
In [5] authors explained on the most common NOSQL database that are currently available describing a variety of different data formats and structures. They presented the concept of polyglot solution, with different parts of the data contain in different databases, but combined together with the logic in the web service. They analyzed on web services and API’s, and stated that the web service can receive and send requests in a standard format, such as REST, and serialize data in a well-understood and portable format, such as JSON. They provided a framework for web application that acts as the user interface, a web service that provides a REST interface to the web application, and a collection of SQL and NoSQL databases that store the data for the web application.
In [6] authors presented a system which is named as Save Our Systems which aims to support application development by hiding the specific details of the different systems. It is based on a Meta modeling approach, in the sense that the specific interfaces of the individual systems are mapped to a common one. The tool provides interoperability according to the specific structures the various NoSQL systems implement; they define a translation process, from meta-layer constructs, to coherent system-specific structures.
In [7] authors studied different databases and motivations to provide an independent understanding of the benefits and limitations of various NoSQL database approaches to bearing applications that process large amount of data; as well as to provide a global aspect of this non-relational NoSQL databases. Also they provide - classification, characteristics and evaluation of NoSQL databases in Big Data.
III. PROPOSED ARCHITECTURE
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
As shown in Fig. 1, an interface is built through which different structured as well as unstructured data stores in cloud are connected. The restful API helps to connect with databases which are in a cloud. The API connects to the database as per specification of the developer. The proposed system performs CRUD (Create, Read, Update and Delete) operations on the data stores as per developer’s requirement. After executing the specified query the result is sent back to the API. On the server side, it shows all the performed operations and its status. On the API it shows the status of a query, either execution of successful or unsuccessful with its code value.
A. REST API:
Ubiquitous access to REST API is one of its best features [8]. It uses standard HTTP method call, available in every language and platform, to perform requests and retrieve information from different data stores. Here the basic methods are mentioned which we performed in this system.
1. Post-Creates a new Entity
2. Get-Returns the entity information 3. Put- Update the entity information 4. Delete-Delete the entity information
The use of REST is usually preferred over the heavyweight SOAP (Simple Object Access Protocol) because REST does not require as much bandwidth, which makes it a more suitable for use over the Internet. The SOAP approach requires writing or using a server side program (to serve data) and a client side program (to request data) while REST basically focuses on a specific set of interactions between data elements rather than implementation details. REST works like a website in a browser. A resource is discovered in a program via a URL. The program can access that URL and receive data about the resource. REST allows for a minimum amount of data to be transferred using the same well-established mechanisms that define the web without a lot of the load introduced by large protocols. This allows programmers to more immediately build programs that access and act upon data discovered via APIs, even in environments with unreliable network speeds and limited computing power.
B. JSON:
JSON (JavaScript Object Notation) it is a self-describing, human readable data format. Originally designed for lightweight data-interchange format between browser and server, it has become widely accepted for many types of applications [9]. JSON documents are mainly useful for data management for various reasons. A JSON document is composed of a set of different fields which are themselves key-value pairs. This means each JSON document contains its own human readable schema design with it. It allows the data stores to easily exchange between database and client applications without losing their meaning. JSON is used in the application layer. It supports a richer and more flexible data structure than tables made up of columns and rows. It supports fields like number, string, Boolean, etc., also it fields can be arrays or nested sub-objects. Using JSON documents in our application means we don’t need an object relational mapping between database and the applications it serves.
IV. IMPLEMENTATION AND RESULTS
The proposed system used some structured as well as unstructured databases which are stored in cloud server like MYSQL, MONGO, and COUCH. We accessed these databases through an implemented interface. Following components shows how actual access takes place via the API through the interface.
A. MYSQL database
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
relationships that define how the database functions. The cloud providers have now integrated MYSQL within their cloud offerings such as IBM blue mix which is developed by IBM.
Fig.2. Access to MYSQL database
Fig. 3: PUT method in MYSQL database
Access to MYSQL database with the help of interface is shown in Fig. 2. The MYSQL database is stored in the cloud server. We used an ‘IBM blue mix’ cloud server for storing the database. We used ‘Insomnia’, inbuilt API for creating a connection to the MYSQL database.
CRUD operations i.e. create, read, update and delete operations are performed on this database. To perform the update operation, PUT method is used. Through API data is passed as Body part. To create connectivity to the database, name and its instance are passed through header part. Then query is executed and further results are sent back to the developer.
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
Body Header
id : 8
name : Mohan city : Pune dept : C salary : 25000
Database-Type: database/real Database-Name: employee esName: updateemp entityId: 8
Accept: application/json Content-Type: application/json
Table 1: Body and Header for PUT method
After requesting the operation the changes are made in the database as shown in Fig. 3.
B. Mongo Database
It is one of the leading NOSQL database which written in C++ [11].It is a document oriented database. The database contains Collection. It does not contain specific schema. Mongo Database requires a data folder to store its files. The default location for the Mongo Database data directory is c:\data\db.It has different methods. A single MongoDB server typically has multiple databases. In Mongo Database you have to design schema according to user requirement. The databases can access with the help of NOSQL statements. Developer can change the structure of records which we usually call as documents by adding new fields or deleting existing ones.
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
Fig. 5. DELETE method in Mongo database
Access to MONGO database with the help of interface is shown in Fig. 4. The Mongo database is stored at server side. We used ‘Insomnia’, inbuilt API for creating a connection to the MONGO database and perform different operations on the database.
CRUD operations i.e. create, read, update and delete operations are performed on this database. To perform the update operation, DELETE method is used.Table 2 shows the example of ‘DELETE’ operation. In header part we specified the ID of the record which has to be deleted.
Header
Database-Type: database/mongoDB Database-Name: mydb
esName: person entityId: 13
Accept: application/json
Table 2: Header for DELETE method
After requesting the delete operation the record is deleted from the database as shown in Fig. 5.
C: Couch database
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
Fig. 6. Access to couch database
Fig. 7. POST method in Couch database
Access to COUCH database with the help of interface is shown in Fig. 6. The COUCH database is stored in the cloud server and it has local host server. That server is used to store database. We used ‘Insomnia’, inbuilt API for creating a connection to the COUCH database.
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
I
nternational
J
ournal of
I
nnovative
R
esearch in
C
omputer
and
C
ommunication
E
ngineering
(An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 7, July 2016
Body Header
name : Ganesh age : 25 gender : male
Database-Type: database/couchDB Database-Name: testing
esName: insert entityId: 1
Accept: application/json
Table 3: Body and Header for POST method
After requesting the insert operation the record is successfully inserted in the database as shown in Fig. 7. Thus, a common interface helps to access structured and unstructured databases easily.
V. CONCLUSION AND FUTURE WORK
We built a common interface to access the structured as well as unstructured databases. Structured database like MYSQL where as unstructured databases like MONGO and COUCH are used. This system helps to reduce the burden of developer for accessing the structured as well as unstructured databases and perform CRUD operations on databases. System is currently working for basic operations. In future, we will try for more complex operations like join, Cartesian product etc.
REFERENCES
1. “Supporting multi data stores applications in cloud environments”,Rami Sellami, Sami Bhiri, and Bruno Defude, DOI10.1109/TSC.2015.2441703, IEEE Transactions on Services Computing
2. “A Survey on Supporting Different Data Stores in Cloud Environment”, IJSRD -International Journal for Scientific Research & Development| Vol. 4, Issue 02, 2016 | ISSN (online): 2321-0613
3. “Using multiple data stores in the cloud:
4. challenges and solutions” Rami Sellami and Bruno Defude,
5. “OpenPaaS DataBase API: ODBAPI Specification REST version “, Rami Sellami and Bruno Defude,
6. “Data Access for Highly-Scalable Solutions: Using SQL, NoSQL, and Polyglot Persistence” , Douglas McMurtry, Andrew Oakley, John Sharp, Mani Subramanian, Hanz Zhang, ISBN: 978-1-62114-030-6
7. “Uniform access to nonrelational data-base systems: The sos platform”, P. Atzeni, F. Bugiotti, and L. Rossi, in Advanced Information Systems Engineer-ing - 24th International Conference, CAiSE 2012, Gdansk, Poland, June 25-29, 2012. Proceedings, 2012, pp. 160–174.
8. “Nosql database: New era of da-tabases for big data analytics - classification, characteristics and comparison”, A. B. M. Moniruzzaman and S. A. Hossain, CoRR, vol. abs/1307.0191, 2013.
9. ”restful_web_services”, Leonard Richardson and Sam Ruby,Froworded by David Hienmeir Hansson ISBN: 978-0-596-52926-0 10. http://www.tutorialspoint.com/json/json_tutorial.pdf
11. http://www.tutorialspoint.com/mysql/mysql_tutorial.pdf 12. http://mdslab.unime.it/sites/default/files/mongodb_tutorial.pdf 13. https://media.readthedocs.org/pdf/couchdb/latest/couchdb.pdf
BIOGRAPHY
Priyanka Waghmare obtained Bachelor of Engineering in 2014 from faculty of Information Technology, Walchand
Institute of Technology Solapur University, Solapur. She is currently pursuing Master of Engineering from faculty of Computer Science and Engineering, Walchand Institute of Technology Solapur Maharashtra.