The data storage is designed to support the smart and dynamic nature of registers provided by OpenSRP as well as to mitigate the risk of losing form (register) data due to unreliable nature of network connectivity.

Dynamic registers are supported using the NoSQL document database CouchDB. Whereas the analysis, tracking and reporting is supported through the traditional RDBMS MySQL / PostGres.

The unreliable network connectivity is mitigated by storing data on handheld device using SQLite.

Relational and No-SQL Database Management Systems (DBMS) are used in different types of domains, and the features provided by each cannot be ignored; therefore, you find different DBMS used in OpenSRP for different types of functionality and project needs.

The data storage systems used by OpenSRP are as follows (this documentation explains the first two categories in detail):

SQLite

The sqlite database will store the form submissions as well as the data in relative databases tables according to the bind types defined .The sqlite database is used in the mobile client for showing the registers. The data shown in the register activities are spooled from the sqlite tables of the respective bind types. By default the tables present in the opensrp client sqlite database are:

The database is usually encrypted with the user login password via sql cipher.

CouchDB

This is the main repository where all individual and identifiable data with each and every detail is stored. There are different databases in CouchDB repository, named as:

opensrp:

opensrp-form

motech-scheduletracking-api

drishti-mcts (Mother and Child Tracking System)

The database contains all reports generated by the MCTS report generator component. The MCTS report generator generates MCTS reports and sends SMS reports to a configured number for audit and tracking purposes for maternal and child health.  This module was created for a specific reporting requirement in India, and it is not currently being used in OpenSRP and will likely be removed in future.

Postgres/MySQL

Postgres and MySQL are relational DBMS and are mainly used for storing OpenMRS data and aggregate data for generating summary and analytics reports. The DBMS is also used by motech quartz scheduler. Details of each database is explained below:

openmrs

motechquartz

opensrp (drishti in older versions):

report

anm_report