Accessing Tables in Autonomous Database from OCI Visual Builder Cloud Service

Santhosh Kumar BVSRK
4 min readJul 2, 2023

--

Oracle Visual Builder Cloud Service is one of the Low-Code Development platforms which is intended for building Mobile/Web applications.

VBCS (Visual Builder Cloud Service) has an inbuilt tenant database which is used to store data of the BO (Business Objects) and apps metadata. In cases where you need more storage for your VBCS BOs & apps metadata you can change the tenant database to an Oracle Database which is publicly accessible follow it here.

In addition, if you want to build an app in VBCS with data from an Oracle Database like Autonomous Database there are few different architectural patterns as shown below, because VBCS cannot talk to ADB directly.

1. Oracle ADB Publicly accessible & ORDS enabled

By default, an ADB will have ORDS enabled. So, here we will see how to fetch data from ADB in VBCS via REST API (i.e., table in ADB exposed as REST API).

Sample Table Data which is exposed as REST API
Sample Table which is exposed as REST API and the REST endpoint
Service Connection to ADB Table via REST API and table data

2. Oracle ADB Publicly accessible & ORDS not enabled

As ORDS is not enabled, we cannot make a REST API call to ADB even though it is publicly accessible. Hence, we need to tweak a bit by making a call to OIC Integration which calls ADB via ATP/ADW adapter to fetch data.

Step1: Create an Integration in OIC which talks to ADB to fetch data.

OIC Integration which fetches data from Public ADB via ATP/ADW adapter

Step2: Create the Integration endpoint as service connection in VBCS

Service Connection with OIC endpoint and data in VBCS app from ADB

3. Oracle ADB not Publicly accessible & ORDS enabled

As your ADB is not publicly accessible you need to access it via a resource in Public network which can be either a VM (with OIC Agent or PE on the public subnet) or a Load Balancer (on Public subnet) and in either cases traffic needs to be allowed between the Public Subnet (where VM/LB is provisioned) & Private Subnet (where ADB is provisioned). For now, I will use Load Balancer whose architecture would be as below

Step1: Create Load Balancer in Public Subnet whose backend is ADB in Private Subnet. Follow this link for configuring the same.

ORDS REST API for ADB Table in Private network

Step2: Create a connection in VBCS for the ORDS REST API

4. Oracle ADB not Publicly accessible & ORDS not enabled

As your ADB is not publicly accessible and as ORDS is not enabled, there won’t be any REST API call. So, we need to use an ATP/ADW adapter to fetch data from ADB i.e., VBCS to call an OIC Integration which pulls data from Private ADB via ATP/ADW adapter and we will be connecting to it via the OIC PE (Private Endpoint) feature where the PE will be on a Public subnet from where there will be route rules in place to talk to ADB in Private subnet.

Step1: Create an OIC Integration which fetches data from ADB using OIC Private Endpoint.

Step2: Create a service connection to the OIC Integration endpoint in VBCS

Service Connection with OIC Integration endpoint

You can also recreate the above scenario using OIC with Connectivity agent as shown below

NOTE: You can replace ADB with Oracle Base Database (DBCS) as well, the only extra thing you need to have is ORDS installation on top of DBCS to expose tables as REST API.

NOTE: The traffic from OIC/VBCS which are in Oracle Services Network (OSN) to VCN in OCI will be via Oracle Backbone and not via Public Internet as long as both OIC/VBCS and your VCN are in the same region.

!!!Happy Reading!!!

--

--

Santhosh Kumar BVSRK
Santhosh Kumar BVSRK

Written by Santhosh Kumar BVSRK

17+ Years in IT/ITES| ML & AI Enthusiast| Oracle Cloud Architect, Integration Specialist — BPEL, OSB, OIC, IICS| Database Scripting-SQL, PL/SQL, MySQL

Responses (1)