June 18 2024

MariaDB Vector. MariaDB will very soon be a vector database

MariaDB Vector, a vector database used for artificial intelligence that could overtake MySQL Server and Percona Server

MariaDB-Vector

MariaDB is a powerful open-source relational database management system, known for its scalability, reliability, and standards compliance. Derived from MySQL, MariaDB offers a number of advanced features that make it a popular choice for developers and businesses around the world.

MariaDB Corporation is the company that develops and supports MariaDB. Founded by some of the original developers of MySQL, MariaDB Corporation is dedicated to providing high-quality database solutions that meet modern data management needs. With a strong commitment to open-source, MariaDB Corporation works closely with the community to constantly innovate and improve MariaDB software, ensuring high performance, security and reliability for its users.

In fact, with the advent of artificial intelligence it has been established that relational databases are the ideal place for AI data. Users need their vectors along with the rest of their data, in a standard database that offers performance, scalability and all the other traditional virtues, such as ACID compliance.

For this reason, MariaDB Corporation is developing MariaDB Vector, a first preview version of which is expected to be released by the end of the month.

Amazon's support for MariaDB Vector

It is not only MariaDB Corporation that supports this logic. Amazon itself, through Sirish Chandrasekharan, General Manager of Amazon Relational Database Services and board member of the MariaDB Foundation, supports this vision. During an interview with The New Stack at the Open Source Summit 2024 in Seattle, Chandrasekharan clearly and concisely explained the importance of integrating generative AI into relational databases.

Two key concepts of generative AI: LLM and RAG

Generative AI is a field of artificial intelligence that deals with the creation of new content using existing data. This technology is not limited to just one type of data, but encompasses a wide range of applications, including text, images, video, and even audio. For example, generative AI models can write articles, generate realistic images from textual descriptions, create animated videos, or even compose music.

The word “generative” suggests the ability to create new data, but in the context of vector databases, it's also about retrieving and searching data intelligently. In other words, while generative AI can indeed create new content, in vector databases it focuses on optimizing the search and retrieval of relevant information from existing data. This happens thanks to AI's ability to carry out searches based on less rigid and more nuanced criteria, using characteristics that simulate human thinking.

LLM, large language models, are where knowledge is intelligently encoded. These models are not relational databases and will never become one, as they represent static snapshots created (“trained”) at specific times and are not updated until the next training session.

RAG, recovery-augmented generation, is a term that is becoming increasingly popular. This technology allows you to dynamically update LLMs using your own data. LLMs are static and only a few entities are large enough to create (“train”) their own. With RAG, users of any size can create (“vectorize” or “embed”) representations of their data, using the intelligence of their chosen LLM to interpret this data.

Large language models, or LLMs, are the basis of most generative AI applications. These models are trained on vast amounts of textual data, allowing them to intelligently understand and generate human language. LLMs encode knowledge into complex structures, allowing them to answer questions, translate languages, summarize texts and much more. However, it is important to note that LLMs are not relational databases. They represent static snapshots created during specific training periods and are not continuously updated. Once trained, LLMs remain unchanged until the next training session, which can be time-consuming and resource-intensive. This limitation means that the information contained in LLMs can become obsolete quickly in a world where data and knowledge are constantly evolving. The ability to update and maintain the relevance of these models is therefore a significant challenge.

Retrieval-augmented generation, or RAG (Retrieval-Augmented Generation), is an emerging technology that is rapidly gaining popularity. This methodology allows LLMs to be dynamically updated using user-specific data. In practice, RAG combines the power of LLMs with the ability to search and retrieve data from other sources, creating a synergy that significantly improves the relevance and accuracy of the answers generated. With RAG, even small to medium-sized companies can leverage the power of LLMs without having to deal with the cost and complexity of training their own models. Using RAG, users can “vectorize” or “embed” their specific data, creating representations that can be easily interpreted by LLMs. This allows AI responses to be tailored to specific business data, thus improving the effectiveness of generative AI applications in commercial contexts.

The synergy between LLM and RAG is crucial to overcome the intrinsic limitations of static language models. While LLMs offer a solid foundation of general knowledge, RAG's ability to incorporate up-to-date, context-specific data allows for greater personalization and relevance of responses. This is particularly useful in environments where data changes rapidly or where user needs are very specific. For example, in the medical sector, an LLM can provide general information about diseases, but integration with RAG can allow the latest research or clinical data to be retrieved and presented, significantly improving the quality of information provided to medical professionals.

Vectors, vector databases and vector indices

The term “vector” has a special meaning in AI, representing multidimensional numerics that capture model-specific knowledge. These vectors are not simple numbers, but complex representations that can have hundreds or thousands of dimensions, each of which corresponds to a specific feature or attribute of the data. For example, a vector representing an image can include dimensions that describe the color, texture, shapes in the image, and so on. This wealth of detail allows AI algorithms to understand and process data in a much more sophisticated way than traditional methods.

A vector database is specifically designed to store, index, and search these complex vectors. These databases are critical for advanced applications such as image recognition, text similarity search, and many other areas that require handling high-dimensional data. There are specialized databases exclusively for managing vectors, but the most beneficial approach is to integrate this capability into existing relational databases, such as MariaDB Server. This allows you to combine the advantages of relational databases, such as ACID compliance and the ability to handle complex queries, with the advanced features of vector databases.

Vector indexes are crucial tools for managing and searching vectorized data. Unlike traditional indexes, which work well for linear or two-dimensional data, vector indexes must be designed to handle the complexity and high dimensionality of AI vectors. Specialized methods such as IVFFlat (Inverted File Flat) and HNSW (Hierarchical Navigable Small World) are needed for this type of data. IVFFlat uses an inverted tree structure to facilitate quick searching, while HNSW builds a network of hierarchical nodes that allow you to navigate between data points efficiently.

The concept of “nearest neighbor” is fundamental in vector search. Instead of looking for an exact match, vector search algorithms look for data that is most similar to the query vector. This is especially useful in applications like image search, where finding an image that is “similar” to a given image is often more useful than finding an exact match. Nearest Neighbor Search leverages the multidimensional characteristics of vectors to quickly identify similarities, significantly improving the speed and effectiveness of searches.

By integrating vector management capabilities into a relational database like MariaDB Server, you get a powerful solution that combines the best of both worlds. Users can benefit from the robustness and advanced features of relational databases, while managing complex, high-dimensional data with efficiency. This approach not only simplifies IT infrastructure, but also offers significant performance improvement in advanced AI and machine learning applications.

ACID is still a virtue

ACID, which stands for Atomicity, Consistency, Isolation and Durability, represents the four fundamental virtues of transactions in relational databases. These principles ensure that every transaction is executed completely and reliably, maintaining data integrity even in the event of system errors or failures. Atomicity ensures that each transaction is an indivisible unit; consistency ensures that the database moves from one valid state to another; isolation prevents transactions from interfering with each other; and durability ensures that transaction results persist even after system crashes.

Even in the context of generative AI, these virtues remain essential to ensure data reliability and security. With generative AI requiring large amounts of data and complex operations, maintaining ACID properties is crucial to preventing data corruptions and ensuring that read and write operations are always consistent and secure. This becomes especially important when integrating advanced features such as vector management and AI into the database, as any compromise in data integrity could have significant impacts on business operations and the quality of the information generated by the AI.

Highlights from Sirish Chandrasekharan's interview

Chandrasekharan highlighted several key points during his interview:

  • Customers base their business on relational databases, which are critical to businesses.
  • Open source databases have reached a good level, allowing companies to rely on them.
  • AWS is increasing its investment in Open Source.
  • For generative AI to be effective, it must be based on existing and accumulated data, which is found in RDBMSs.
  • RAG allows you to customize an LLM for your business needs.
  • There is no need to create new vector databases; vectors should be integrated into existing databases.
  • PostgreSQL already has a vector storage plugin supported by AWS, which is also supporting the MariaDB Foundation's vector work.
  • Amazon is the third largest contributor to MariaDB Server, after MariaDB plc and MariaDB Foundation.

MariaDB Vector: a look into the future

MariaDB Corporation and MariaDB Foundation have been working for some time on MariaDB Vector, an innovative project that will bring advanced vector search capabilities to the MariaDB database. This development represents a significant step toward integrating AI capabilities directly into relational databases, dramatically improving the ability to manage and search complex data.

The first developer preview of MariaDB Vector will be available in May and will focus on the implementation of the Hierarchical Navigable Small World (HNSW) method, which is generally considered better than IVFFlat (Inverted File Flat) due to its superior scalability performance and accuracy in search queries. similarities. This technical choice will ensure that MariaDB Vector can effectively manage large volumes of vector data, offering fast response times and accurate results, making it ideal for critical applications requiring high performance.

Unlike other solutions like PG Vector, the vector search functions in MariaDB will be integrated directly into the server core. This means that no additional extensions will be needed to take advantage of these advanced features, significantly simplifying the implementation and maintenance process for users. Native integration into the server will also ensure greater efficiency and consistency in database operations, providing a smoother and more reliable user experience.

MariaDB Vector will keep large language models (LLMs) separate from server binaries, allowing users to freely choose between different LLMs available on the market, such as ChatGPT, Claude and LLaMa2. This flexibility allows companies to select the model that best suits their specific needs, without being tied to a single solution. Furthermore, it allows you to update or change the models used without having to modify the database infrastructure, ensuring greater adaptability and future-proofing of the implemented solutions.

The primary use case for MariaDB Vector will be Retrieval Augmented Generation (RAG), a technique that combines the power of LLMs with the ability to retrieve specific, relevant data from the database. This approach will allow AI responses to be personalized based on specific business data, significantly improving the relevance and usefulness of the information generated. However, concrete use cases for MariaDB Vector are still being defined and developed, with new applications and use scenarios emerging as the technology is adopted and field-tested.

Test MariaDB Vector

MariaDB Corporation invites users to test MariaDB Vector, with a nightly version available in the branch bb-11.4-vec-preview. The developer version will be stable by the end of May, ready to be tested on common use cases.

Generative AI isn't just hype, and combining it with open-source relational databases is the next crucial step. Around FOSDEM in March, the basic functionality of MariaDB Vector was already demonstrated. You will soon be able to get the first preview version of MariaDB Vector on the MariaDB download pages.

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

INFORMATION

Managed Server Srl is a leading Italian player in providing advanced GNU/Linux system solutions oriented towards high performance. With a low-cost and predictable subscription model, we ensure that our customers have access to advanced technologies in hosting, dedicated servers and cloud services. In addition to this, we offer systems consultancy on Linux systems and specialized maintenance in DBMS, IT Security, Cloud and much more. We stand out for our expertise in hosting leading Open Source CMS such as WordPress, WooCommerce, Drupal, Prestashop, Joomla, OpenCart and Magento, supported by a high-level support and consultancy service suitable for Public Administration, SMEs and any size.

Red Hat, Inc. owns the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. owns the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt. Oracle Corporation owns the rights to Oracle®, MySQL®, and MyRocks®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; REDIS® is a registered trademark of Redis Labs Ltd. F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB. Adobe Inc. holds the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited. Automattic Inc. owns the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert holds the rights to Drupal®. Amazon Web Services, Inc. holds the rights to AWS®; Google LLC holds the rights to Google Cloud™ and Chrome™; Microsoft Corporation holds the rights to Microsoft®, Azure®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®. Apache® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group. CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV Hetzner Online GmbH owns the rights to Hetzner®; OVHcloud is a registered trademark of OVH Groupe SAS; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Facebook, Inc. owns the rights to Facebook®. This site is not affiliated, sponsored or otherwise associated with any of the entities mentioned above and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. Any other trademarks mentioned belong to their registrants. MANAGED SERVER® is a trademark registered at European level by MANAGED SERVER SRL, Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

Back to top