Skip to Main Content

New

How I Configured FreeSQL with Oracle APEX, Node.js & Python (Step-by-Step Guide)

Published on 19 Mar 2026 by CHATURVEDINIDHI26@GMAIL.COM


What is FreeSQL & Why I Used It?

FreeSQL provides a ready-to-use Oracle schema with connection details like:

  • Host: db.freesql.com
  • Port: 1521
  • Service Name
  • Username / Password

This makes it super easy to:

  • Practice SQL
  • Build backend integrations
  • Test real-time database connectivity

Step 1: Understanding Connection Details

From FreeSQL dashboard, I got:

Host: db.freesql.com  
Port: 1521  
Service: 23ai_mb9q7  
Username: SQL_HSKE...  
Password: (generated)

These details are the foundation for any integration.

 

 Step 2: Connecting with Oracle APEX

If you are using Oracle APEX:

Option 1: REST API (Recommended)

Create ORDS REST service

Use it inside APEX via Web Source Module

Option 2: DB Link (Advanced)

 

CREATE DATABASE LINK freesql_link
CONNECT TO username IDENTIFIED BY password
USING 'db.freesql.com:1521/23ai_mb9q7';

 

Then:

 

SELECT * FROM user_tables@freesql_link;

 


🧪 Step 3: Node.js Integration (Backend API)

I tested backend connectivity using Node.js.

Install package:

 

npm install oracledb

 

Connection code:

 

const oracledb = require('oracledb');

const dbConfig = {
  user: "SQL_HSKE7115YMFB38WZLS20P7HZ8E",
  password: "YOUR_PASSWORD",
  connectString: "db.freesql.com:1521/23ai_mb9q7"
};

Fetch data:

 

async function run() {
  const connection = await oracledb.getConnection(dbConfig);

  const result = await connection.execute(
    `SELECT table_name FROM user_tables`
  );

  console.log(result.rows);
}

run();

 

👉 This helped me build backend APIs easily.


Step 4: Python Integration

Then I explored Python connectivity using cx_Oracle.

Install:

 

pip install cx_Oracle

Code:

 

  • import cx_Oracle
    
    dsn = cx_Oracle.makedsn("db.freesql.com", 1521, service_name="23ai_mb9q7")
    
    connection = cx_Oracle.connect(
        user="SQL_HSKE7115YMFB38WZLS20P7HZ8E",
        password="YOUR_PASSWORD",
        dsn=dsn
    )
    
    cursor = connection.cursor()
    
    cursor.execute("SELECT table_name FROM user_tables")
    
    for row in cursor:
        print(row)
    
    cursor.close()
    connection.close()

 

 Python made it very easy for scripting and automation.

 

Step 5: Building a Simple API (Node.js + Express)

To make it more real-world, I created an API:

 

const express = require('express');
const app = express();

app.get('/tables', async (req, res) => {
  const connection = await oracledb.getConnection(dbConfig);

  const result = await connection.execute(
    `SELECT table_name FROM user_tables`
  );

  res.json(result.rows);
});

app.listen(3000, () => {
  console.log("Server running on port 3000");
});

 


Step 6: Adding AI Thinking

Instead of writing SQL manually, I started using natural language:

Input:

  • Show all records created this month

Converted Query:

 

SELECT * 
FROM your_table
WHERE created_date >= TRUNC(SYSDATE,'MM');

 This is where AI + SQL becomes powerful.

 

 

 Key Learnings

FreeSQL is perfect for testing real integrations

Node.js is best for APIs

Python is great for automation

APEX works best with REST-based approach

AI can completely change how we write SQL

 

 


 Final Thoughts

This journey made me realize one thing:

  • It’s not just about databases anymore…
    It’s about building intelligent systems around data.


 

#OracleAPEX #FreeSQL #NodeJS #Python #SQL #AI #BackendDevelopment #WebDevelopment #TechJourney #Learning #WomenInTech #Innovation

📝 Nidhi Blog

Sharing knowledge, tutorials, and stories about Oracle APEX, development, and digital growth.

📧 Contact

Email: support@nidhispace.com

Follow us on:
linkedin | YouTube


© Nidhi Blog. All rights reserved.