DEV Community

Judy
Judy

Posted on

2 1 1 1 1

How to Perform Join Queries on Different Types of Databases #72

Problem description & analysis

There is a data table persons in MySQL, as shown below:

Image description
There is a data table orders in Oracle, as shown below:

Image description
We are trying to list all people and all orders in a corresponding way. Below is the desired result:

Image description
Solution

Write the following script p1.dfx in esProc:

Image description
Explanation:

A1  Connect to MySQL database.

A2  Get data from persons table.

A3  Connect to Oracle database.

A4  Get data from orders table.

A5  Perform a full join on A2 and A4 by id_p to list all desired data.

Read How to Call an SPL Script in Java to learn how to integrate the script code into a Java program.

Open source SPL source address

Download

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay