'How can I get a React application to send SQL queries to an Oracle database and retrieve results?

Background: I need to create a web application that connects to an Oracle database hosted by my university through a VPN. The app does not have to be hosted online, therefore when I run the React app, I will be running it locally. I have only created one MERN stack application before, but this time I will not be using MongoDB, and instead will be pulling from an Oracle database set up by my university.

Main objective: I need to be able to write out SQL queries WITHIN my React application code, make requests with that to the database and retrieve results to be able to plot on graphs.

What I am using: I am using a Windows 10 PC, running a React application with Visual Studio Code. To access the database, I use Cisco AnyConnect as a VPN, and then use Oracle SQL developer to establish a connection to the database and make queries from there.

What I need help understanding (connecting the dots): I used Node/Express to locally host a MongoDB database in my previous project and used Axios within my React application to access the database. I do not understand if or how I can establish a connection to the Oracle database within my React app, and how I can make it so that I can use actual SQL queries within the javascript code.

Any help, references, guidance, would be greatly appreciated. I am a beginner so please go easy on me.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source