DATA LOADING

Introduction

Data loading is the process of data transfer from data entry systems to data management systems. For these operation, we use a defined library the questionnaire library and the user derived Json layouts. The data entry systems include :-

In the questionnaire library we have developed three data loading methods there are as follows:

In the Json layouts, they have the following parameters.

USAGE

Data loading supports the migration of data from one source to another to support many application requirements or needs. Firstly, it can be used where one needs to carry the below operations:-

Data Transfer From Database To database


In this loading, the data transferred is either :-

It allows the user to add and modify the data to fit the requirements thus efficiency and quality.

Transfer from simple data entry methods


Data stored in simple methods is hard to interrogate and its accumulation leads to the difficulty in management. Transfer of this to a database improves the data management as well quality. Thereby, Interrogating of the data becomes simple and can be done easily by anyone with good knowledge in using the language SQL.

SQL allows manipulation of data through a number of statements . They are:-

To support application updates and upgrades


For data to maintain its integrity, transfer is key. This is needed where one needs to add or remove certain elements or attributes from an already existing database without altering its model and data. Thus, a user needs to design a new database with the new requirements and afterwards transfer the data adding the new information.

This is crucial where if any problem is to occur during the changes implementation, one can revert to the older version without any data loss or corruption.

DESCRIPTION

To transfer data, we develop json based layouts that help in querying of the data to load. These requires a source and a destination. It can be used for loading both small amounts of data and large amounts regardless of the source of the data.

The source is defined as a table which comprises of a few parameters. The syntax varies from the type of data entry system. Firstly, we'll have a look at the tabular entry.

JSON LAYOUTS

The json files have used for loading data to databases through the questionnaire library.

TABLE


This is data stored in simple tables. For tabular, we have two main parameters. They are as follows:

  1. Class name - This is the type of query to execute.

     

  2. Args - this are the parameters required by the class name to be able to query for the data. They are:-

    • Tname - The table name to look up for the data.
    • Query - The sql statement to execute on the table above to get the data.
    • Database - The database in which the table is and for getting the data.

EXCEL SHEETS


This is data stored in formatted sheets in form of csv (comma separated values). It requires two parameters as well. They are as follows:-

1. Class name - The type of query to execute.

  1. Args - this are the arguments required to look up for data from the excel sheets. They are as follows:-

    • Tname -The name of the text table.
    • Filename - The filename that holds the data.
    • Cnames - These are the column names where if left empty, the user intends to use the default values as in the data sheet.
    • Delimiter - This is the operator that is used to separate the data. i.e comma ','.
    • Header start - Represents the row number which by default starts from 0, where if the number is a negative value, means that the file has no header.
    • Body start - Represents the row number starting from a value of 0 This indicates where the body of the data starts.

LABELS


The labels contain the destination of the data. It has 5 parameters with the following structure :-

The above represents different values required by the questionnaire in order to load the data. They are as follows:-

1.This contains the database name of where to save the data.

2.The table name of the database to insert the data.

3.The alias which is empty when loading to a specific table only. Its however takes the name of the table provided to aid in successful loading of foreign key data.

4.The column name where the data is to be inserted in the specified table.

5.The value to save. This may be a simple value or a look up value which is queried from the provided source.

NB: For look up data, the data is reference using the structure below.

[ class_name, tname, cname]

For a column name(cname), it varies from one layout to the other i.e the value in:-

This mode of loading can be used to load either a single table a time or multiple tables at the same time.

Example of a JSON layout

A simple JSON layout for loading a:-

I. single table.

II. excel sheet(csv).