AI‑Powered Vector Database Implementation on Popular RDBMSs
(Patent Pending)
Overview
Relational database management systems (RDBMSs) or NoSQL Databases traditionally rely on exact-match
queries, keyword searches, or manually defined indexes to retrieve records. These
approaches require users to know the precise structure, wording, or schema of stored
data and are entirely ineffective when queries are expressed in natural language or
when semantic equivalence is required. For example, a query for "force equals mass
times acceleration" cannot retrieve a record containing "Isaac Newton" using
conventional SQL alone. We have developed semantic search query capability that can run on
PostgreSQL (with pgvector)
Oracle 23ai/26ai or later
Microsoft SQL Server 2025 or later
MariaDB (11.4 or 11.7 or later)
SingleStore (9.0.9 or later)
IBM DB2 12.1
TiDB 8.5.5
MongoDB 8.2.5
Cassandra 5.0.6
Redis 7.4.7
Couchbase Enterprise 7.6.0-2176
Dremio Datalake 26.0.5
MySQL 9.5.1-u2-cloud
Google BigQuery
Demo with MariaDB 12.1.2
Table Schema & Indexing:
CREATE DATABASE salesdb;
USE salesdb;
CREATE TABLE IF NOT EXISTS thing (
id INT PRIMARY KEY auto_increment,
content TEXT,
content_vec VECTOR(1024) NOT NULL,
VECTOR INDEX (content_vec)
);
/* Table entries */
select id, content from thing;
MariaDB [salesdb]> select id, content from thing;
+----+--------------------------+
| id | content |
+----+--------------------------+
| 1 | Isaac Newton |
| 2 | Jane Austen |
| 3 | Wolfgang Amadeus Mozart |
| 4 | Ludwig van Beethoven |
| 5 | Albert Einstein |
| 6 | Charles Dickens |
| 7 | William Shakespeare |
| 8 | Mark Twain |
| 9 | Leo Tolstoy |
| 10 | Fyodor Dostoevsky |
| 11 | J.K. Rowling |
| 12 | George Orwell |
| 13 | Ernest Hemingway |
| 14 | F. Scott Fitzgerald |
| 15 | Homer |
| 16 | Dante Alighieri |
| 17 | Miguel de Cervantes |
| 18 | Victor Hugo |
| 19 | Mary Shelley |
| 20 | Agatha Christie |
| 21 | Arthur Conan Doyle |
| 22 | J.R.R. Tolkien |
| 23 | C.S. Lewis |
| 24 | H.G. Wells |
| 25 | Jules Verne |
| 26 | Emily Bronte |
| 27 | Charlotte Bronte |
| 28 | Virginia Woolf |
| 29 | Franz Kafka |
| 30 | Sun Tzu |
| 31 | Confucius |
| 32 | Plato |
| 33 | Aristotle |
| 34 | Niccolo Machiavelli |
| 35 | Galileo Galilei |
| 36 | Nicolaus Copernicus |
| 37 | Johannes Kepler |
| 38 | Marie Curie |
| 39 | Niels Bohr |
| 40 | Michael Faraday |
| 41 | James Clerk Maxwell |
| 42 | Alan Turing |
| 43 | Ada Lovelace |
| 44 | Grace Hopper |
| 45 | Tim Berners-Lee |
| 46 | Linus Torvalds |
| 47 | Steve Jobs |
| 48 | Pablo Picasso |
| 49 | Leonardo da Vinci |
| 50 | Vincent van Gogh |
| 51 | Michelangelo |
| 52 | Raphael |
| 53 | Salvador Dali |
| 54 | Claude Monet |
| 55 | Rembrandt |
| 56 | Johann Sebastian Bach |
| 57 | Pyotr Ilyich Tchaikovsky |
| 58 | Antonio Vivaldi |
| 59 | Chopin |
| 60 | Richard Wagner |
| 61 | Igor Stravinsky |
| 62 | Miles Davis |
| 63 | Louis Armstrong |
| 64 | The Beatles |
| 65 | Bob Dylan |
| 66 | Michael Jackson |
| 67 | Elvis Presley |
| 68 | William Wordsworth |
| 69 | T.S. Eliot |
| 70 | Robert Frost |
| 71 | Pablo Neruda |
| 72 | Gabriel Garcia Marquez |
| 73 | Haruki Murakami |
| 74 | Chinua Achebe |
| 75 | Khaled Hosseini |
| 76 | Stephen King |
| 77 | Dan Brown |
| 78 | Suzanne Collins |
| 79 | George R.R. Martin |
| 80 | Neil Gaiman |
| 81 | Margaret Atwood |
| 82 | Yuval Noah Harari |
| 83 | Malala Yousafzai |
| 84 | Nelson Mandela |
| 85 | Martin Luther King Jr. |
| 86 | Mahatma Gandhi |
| 87 | Winston Churchill |
| 88 | Sigmund Freud |
| 89 | Carl Jung |
| 90 | Jean-Paul Sartre |
| 91 | Simone de Beauvoir |
+----+--------------------------+
/* Search “author of fur elise”, database returns table entry “ludwig van beethoven”. */
call semantic_search_thing('author of fur elise','EN',1);
MariaDB [salesdb]> call semantic_search_thing('author of fur elise','EN',1);
+----------------------+----------------------+
| content | qry |
+----------------------+----------------------+
| Ludwig van Beethoven | author of fur elise |
+----------------------+----------------------+
call semantic_search_thing('author of turkish march','EN',1);
MariaDB [salesdb]> call semantic_search_thing('author of turkish march','EN',1);
+-------------------------+-------------------------+
| content | qry |
+-------------------------+-------------------------+
| Wolfgang Amadeus Mozart | author of turkish march |
+-------------------------+-------------------------+
/* Search “author of to be or not to be, that is the question”, database returns table entry “William Shakespeare”. */
MariaDB [salesdb]> call semantic_search_thing('author of to be or not to be, that is the question','EN',1);
+---------------------+----------------------------------------------------+
| content | qry |
+---------------------+----------------------------------------------------+
| William Shakespeare | author of to be or not to be, that is the question |
+---------------------+----------------------------------------------------+
/* Search “force equals mass times acceleration”, database returns table entry “Isaac Newton” */
call semantic_search_thing('force equals mass times acceleration','EN',1);
MariaDB [salesdb]> call semantic_search_thing('force equals mass times acceleration','EN',1);
+--------------+--------------------------------------+
| content | qry |
+--------------+--------------------------------------+
| Isaac Newton | force equals mass times acceleration |
+--------------+--------------------------------------+
/* Search “energy equals mass times speed of light squared”, database returns table entry “Albert Einstein”. */
call semantic_search_thing('energy equals mass times speed of light squared','EN',1);
MariaDB [salesdb]> call semantic_search_thing('energy equals mass times speed of light squared','EN',1);
+-----------------+-------------------------------------------------+
| content | qry |
+-----------------+-------------------------------------------------+
| Albert Einstein | energy equals mass times speed of light squared |
+-----------------+-------------------------------------------------+
/* Search “author of David Copperfield”, database returns table entry “Charles Dickens”. */
call semantic_search_thing('author of David Copperfield','EN',1);
+-----------------+-----------------------------+
| content | qry |
+-----------------+-----------------------------+
| Charles Dickens | author of David Copperfield |
+-----------------+-----------------------------+
/* Search “author of war and peace”, database returns table entry “Leo Tolstoy”. */
call semantic_search_thing('author of war and peace','EN',1);
MariaDB [salesdb]> call semantic_search_thing('author of war and peace','EN',1);
+-------------+-------------------------+
| content | qry |
+-------------+-------------------------+
| Leo Tolstoy | author of war and peace |
+-------------+-------------------------+