top of page

Creating AI-enabled applications with Autonomous Database and the new SELECT AI feature

Creating AI-enabled applications with Autonomous Database and the new SELECT AI feature involves several steps. This guide will walk you through the process of setting up your environment, using the SELECT AI feature, and developing an AI-enabled application.


Step 1: Setup Autonomous Database


  1. Access OCI Console:

  1. Create Autonomous Database:

  • Navigate to "Autonomous Database" under "Databases".

  • Click on "Create Autonomous Database".

  • Fill in the required details, such as compartment, display name, and database name.

  • Choose "Transaction Processing" or "Data Warehouse" based on your application requirements.

  • Configure OCPU count, storage, and other options.

  • Click "Create Autonomous Database".


Step 2: Enable AI Services


  1. Navigate to AI Services:

  • In the OCI Console, go to "AI Services".

  1. Enable Required AI Services:

  • Enable the AI services you plan to use, such as Oracle Machine Learning, Natural Language Processing, and others.


Step 3: Configure Your Development Environment


  1. Download and Install Oracle SQL Developer:

  1. Connect to Autonomous Database:

  • In SQL Developer, create a new connection.

  • Use the wallet file downloaded from the Autonomous Database setup for secure connectivity.

  • Test the connection to ensure it is working.


Step 4: Use SELECT AI in SQL Queries


  1. Familiarize with SELECT AI Syntax:

  • The SELECT AI feature allows you to use pre-trained AI models directly in your SQL queries.

  1. Write SQL Queries with AI Functions:

  • Here is an example of using SELECT AI to analyze text data: SELECT AI_TEXT_ANALYSIS('Text to analyze', 'LANGUAGE') AS language, AI_TEXT_ANALYSIS('Text to analyze', 'ENTITY_RECOGNITION') AS entities FROM DUAL;

  1. Test Queries in SQL Developer:

  • Run your SELECT AI queries in SQL Developer to test and validate the results.


Step 5: Develop Your AI-Enabled Application


  1. Choose a Development Framework:

  • Select a development framework that supports database connectivity, such as Java, Python, Node.js, or others.

  1. Set Up Database Connection:

  • Use the database credentials and wallet file to set up a secure connection to the Autonomous Database in your application.

  1. Integrate AI Queries:

  • Integrate your SELECT AI SQL queries into your application logic.

  • Example in Python using cx_Oracle: import cx_Oracle connection = cx_Oracle.connect('username', 'password', 'tns_alias', encoding="UTF-8") cursor = connection.cursor() query = """ SELECT AI_TEXT_ANALYSIS('Text to analyze', 'LANGUAGE') AS language, AI_TEXT_ANALYSIS('Text to analyze', 'ENTITY_RECOGNITION') AS entities FROM DUAL """ cursor.execute(query) for row in cursor: print(row)


Step 6: Deploy and Monitor Your Application


  1. Deploy Application:

  • Deploy your application on a server or cloud service.

  • Ensure the application can connect to the Autonomous Database securely.

  1. Monitor AI Queries and Performance:

  • Use OCI Monitoring and Logging services to monitor the performance of your AI queries.

  • Optimize queries and application logic based on the monitoring data.


Step 7: Iterative Development and Enhancement


  1. Iterate and Improve:

  • Continuously test and improve your AI queries and application logic based on user feedback and performance metrics.

  1. Explore Advanced AI Features:

  • Explore and integrate more advanced AI features and models as needed for your application.


By following these steps, you can create robust AI-enabled applications using the new SELECT AI feature in Oracle Autonomous Database. This allows you to leverage powerful AI capabilities directly within your database queries, simplifying the development of intelligent applications.

2 views

Recent Posts

See All

Комментарии


AiTech

©2023 by AiTech

bottom of page