Data source

Last updated 7 months ago

In this chapter, we will show how to create a data source for your business application.

Data source can be a relational database table or REST service.

Relational Database
Rest Service

Here's the diagram of relationship between basic components of a simple one table, one CRUD form, and one grid business application.

So, let's go ahead and create a table.

Click on Synchronize DB

Click on Add SQL on Stage

this

Write your SQL query, tick Run Local? and then press save button

-- Our DDL for this guide
CREATE TABLE x_person(
person_id integer NOT NULL, -- sequential primary key
name character varying(50) NOT NULL,
surname character varying(50) NOT NULL,
age integer,
CONSTRAINT pk_person PRIMARY KEY (person_id) -- primary key definition
);
CREATE sequence seq_x_person;

here: Pull Table from Database

Click on Define Table icon

Enter table name

You have created your database table for your application!

We will use JSONPlaceholder for this guide. See https://jsonplaceholder.typicode.com/ for more detail.

Select REST and click on new

Enter configurations, tick Active and click save

Select the docs service and click new to add a method

Enter method details and click save

Select listUsers method and click new to add a parameter

Enter details and click save

Select the data parameter and click new

Enter id and save

Enter name and save

You have configured a REST service!

Next we will build user interface for our application.