Sunday, November 17, 2024

Favorite Feature in Oracle 23ai

 In today's data-driven world, businesses rely on robust databases to manage their mission-critical workloads. Oracle Database 23ai Free offers a streamlined experience of this industry-leading database, with resource limits of up to 2 CPUs for foreground processes, 2 GB of RAM, and 12 GB of user data on disk. This free version is designed for ease of use and simple download, making it an ideal starting point for exploring the capabilities of Oracle Database.


A key feature that sets Oracle Database 23ai apart is its AI Vector Search capability. But what exactly are vectors? In simple terms, vectors are mathematical representations of data that capture complex relationships and patterns. They are a way to encode data, such as text, images, or audio, into numerical values that can be easily processed and analyzed by machines. Vectors enable computers to understand the semantic meaning and context of data, allowing for more accurate and efficient searching and analysis.


Vector search takes this concept a step further. It is a technique used to quickly identify similar data points within a vast dataset. Traditional search methods rely on keyword matching or exact phrase searches, but vector search enables more nuanced and intuitive queries. By comparing the vector representations of different data points, vector search can identify patterns and relationships that would be missed by traditional search methods.

Oracle AI Vector Search builds on this technology, introducing a converged database capability that revolutionizes the way businesses interact with their data. 


By storing vectors as a native data type and utilizing vector indexes and SQL functions, AI Vector Search enables fast and simple similarity search queries on both structured and unstructured data. This means that customers can quickly identify similar information across documents, images, and other unstructured data sources. Furthermore, AI Vector Search allows prompts to large language models (LLMs) to be augmented with private business data or domain knowledge, unlocking new possibilities for data-driven insights and decision-making.


With Oracle AI Vector Search, businesses can unlock the full potential of their data, uncovering hidden patterns and relationships that drive innovation and growth. Whether you're working with text, images, or other data types, Oracle Database 23ai's AI Vector Search capability is poised to transform the way you search, analyze, and interact with your data.

Insallation:

Intall it with Docker:

docker pull container-registry.oracle.com/database/free:latest

Install it with Oracle VirtualBox:

Oracle_Database_23ai_Free_Developer.ova

Install it with Linux / Windows:

oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
WINDOWS.X64_236000_free.zip

Connecting to Oracle Database Free:

For PDB: sqlplus sys@localhost:1521/FREEPDB1 as sysdba
For CDB: sqlplus sys@localhost:1521/FREE as sysdba

In Python:

import oracledb

conn = oracledb.connect(user="[Username]", password="[Password]", dsn="localhost:1521/FREEPDB1")
with conn.cursor() as cur:
   cur.execute("SELECT 'Hello World!' FROM dual")
   res = cur.fetchall()
   print(res)
   
In Go:

package main
     
import (
      "fmt"
      "log"
      "database/sql"
      _ "github.com/godror/godror"
)
     
func main() {  
     
      // connectString format: [hostname]:[port]/[DB service name]
     
      dsn := `user="[Username]"
              password="[Password]"
              connectString="localhost:1521/FREEPDB1"`  
     
      db, err := sql.Open("godror", dsn)
      if err != nil {
        panic(err)
      }
      defer db.Close()
     
      rows, err := db.Query("SELECT 'Hello World!' FROM dual")
      if err != nil {
        panic(err)
      }
      defer rows.Close()
     
      var strVal string
      for rows.Next() {
        err := rows.Scan(&strVal)
        if err != nil {
          log.Fatal(err)
        }
        fmt.Println(strVal)
      }
      err = rows.Err()
      if err != nil {
        log.Fatal(err)
      }
     
}  

No comments: