Summary
How can Oracle Autonomous Database data be queried from an APEX chat?
The demonstration integrates Select AI and OpenAI for natural language questions, generated SQL and query explanations. Database Actions creates a user and prepares network access and execution permissions for DBMS_CLOUD and DBMS_CLOUD_AI.
An OpenAI credential is then configured using an API Key, along with an AI profile containing the target tables. The test asks how many customers in San Francisco are married and reviews the corresponding SQL query.
The walkthrough creates an Oracle APEX workspace associated with the demo schema, imports the example SQL application and installs its supporting objects. The chat repeats the question and explores options to display SQL and its explanation.
Start
The introduction presents natural language data queries with Oracle Autonomous Database, Select AI and OpenAI models. An Oracle APEX chat lets users ask questions over their tables and inspect the queries behind the responses.
Access to Autonomous Database and User Creation
Database Actions opens from Autonomous to create the demo user. Its password, quota and web access options are configured, and the example role is assigned. This schema will support the AI profile configuration and APEX workspace.
Network and use permits for DBMS_CLOUD
The SQL window prepares network access for the user to communicate with the external provider. Execution permissions are then granted for DBMS_CLOUD and DBMS_CLOUD_AI. These steps prepare the user before credentials and the AI profile are configured.
OpenAI Credentials and profile with DBMS_CLOUD_AI
The demo user signs in and runs the credential creation script. An API Key is obtained from the OpenAI account and used in this configuration. A profile is then created with the tables providing context for queries over the example data.
First Consultation in Natural Language and SQL generated
The question asks how many customers in San Francisco are married, and the SQL representing this request is reviewed. The project guide includes DBMS_CLOUD_AI.GENERATE examples with an explicit profile_name to identify the query profile. The segment connects the natural language question to its SQL expression.
Creation of Workspace at Oracle APEX
The administrator creates an Oracle APEX workspace associated with the demo schema. User details, password and email are completed, and creation is confirmed. The workspace is then opened to prepare the chat application.
Import and installation of the application
APEX imports the project SQL file representing the application. After import finishes, installation runs and supporting objects are added. These components make the chat available with the example OpenAI configuration.
Chat Test and SQL explanation
The application OpenAI configuration is reviewed, and the question about married San Francisco customers is asked again. The chat displays a response and offers generated SQL and its explanation. The closing presents natural language interaction with relational data through APEX.