AI Solution

Generate SQL Queries from Natural Language Using Oracle Autonomous Database Select AI

Introduction

Complex problems often are resolved by integrating multiple technologies. This solution explores the integration of cutting-edge AI technologies, including Cohere AI with Oracle Autonomous Database Select AI, to craft responsive SQL queries or engage in conversational interactions. With the aid of the DBMS_CLOUD_AI package, we configure the translation of natural language prompts into SQL statements, seamlessly bridging the gap between user input and database interaction.

Oracle APEX is used to build a user-friendly interface, letting users easily input queries and visualize AI-generated results. Additionally, we leverage Oracle Machine Learning Notebooks to execute Select AI SQL queries, further enhancing our analytical capabilities.

This solution showcases a practical example of Cohere AI’s synergy with Oracle Autonomous Database, using customer information and hospital data tables to illustrate the potential of AI-driven database interactions.

Demo

Demo: Generate SQL Queries from Natural Language Using Oracle Autonomous Database Select AI (1:19)

Prerequisites and setup

  1. Oracle Cloud account—sign-up page
  2. Oracle Cloud Infrastructure—documentation
  3. Cohere developer guide—documentation
  4. Oracle APEX—documentation
  5. Oracle Autonomous Database—documentation

注:为免疑义,本网页所用以下术语专指以下含义:

  1. Oracle专指Oracle境外公司而非甲骨文中国。
  2. 相关Cloud或云术语均指代Oracle境外公司提供的云技术或其解决方案。