OceanBase AI Database inherits the production-proven capabilities of OceanBase Database, including deep MySQL compatibility, strongly consistent transactions, high-concurrency processing, and high-compression storage, providing a solid database foundation for AI data scenarios. It also offers a comprehensive security and access control system. On top of that, its storage-compute separated architecture delivers extreme low cost and high availability. This document introduces the core features of OceanBase AI Database.
Native capabilities for agent scenarios
OceanBase AI Database makes the three core behaviors of isolation, memory, and trial-and-error in agent scenarios native to the database, eliminating the need for application-layer implementation.
Five-level in-cluster isolation
OceanBase AI Database supports five levels of isolation across tenants, databases, namespaces, tables, and rows/columns, meeting isolation requirements across scenarios and supporting millions of application instances.
Tenant-level isolation
Multiple tenants can be created within a single cluster. Each tenant has its own resource quotas, metadata, users, and permissions, and they do not affect one another. This model is suitable for different business lines, different customers, or scenarios with strict SLA and resource boundary requirements. It provides the strongest isolation, but also comes with the highest management overhead and resource cost.
Database-level isolation
Multiple databases can be created within the same tenant. Tables, views, and stored procedures in each database are independent and isolated from one another. This is suitable for different Agent applications or business domains under the same customer. It is lighter-weight than tenant isolation, but each database still needs to maintain its own schema separately.
Namespace-level isolation (logical tables)
Logical tables refer to logically isolated namespaces created on the same physical table structure for different Agents, users, or business domains. Data in different namespaces is isolated, while sharing the same schema and physical storage. This is suitable for SaaS multi-tenant scenarios and large-scale Agent memory stores, where there are many subjects but relatively little data per subject. It avoids creating a separate physical table for each Agent or user, thereby reducing metadata scale and operational overhead.
Table-level isolation
Different Agents, users, or business domains use different physical tables, with schemas that can evolve independently. This is suitable for scenarios with large differences in data structure, or scenarios that require independent indexes and independent lifecycle management. A large number of tables increases metadata management cost, so this model is better suited to scenarios with a manageable number of subjects.
Row-level isolation/Column-level isolation
Row-level isolation allows different Agents or users to access only their own rows in the same table. Column-level isolation controls the visibility of sensitive fields and is suitable for scenarios where the table structure is shared but data access requirements are strict. It can be implemented through application-side filtering, or combined with database capabilities such as row-level security (RLS) and column-level privileges.
Hybrid search for memory retrieval
Agent memory typically exists in multiple forms, and retrieval often requires combining multiple search conditions: structured filters to narrow the scope, vector search to find semantically similar content, and full-text search to find keyword matches. OceanBase AI Database supports memory retrieval in a single SQL statement through hybrid search, without stitching together multiple systems, while consistency is guaranteed by database transactions.
Unified storage for multimodal data
Agent memories come in various types, including:
- Long-term memory: vectors (knowledge embeddings), text (conversation history), JSON (metadata/tags)
- Short-term memory: relational tables (task status, context variables), JSON (intermediate results)
- Tool invocation records: structured logs, text parameters, vector semantics
- Multimodal inputs: images, audio, video, and their corresponding vectors and descriptive text
On the database side, relational tables, JSON, TEXT, BLOB, Vector, GIS, and other types can be stored in a unified way, avoiding the need for Agents to integrate with multiple heterogeneous storage systems.
Index-based hybrid search
Memory retrieval often involves multiple conditions, such as scalar filters on user ID, session ID, and time range; full-text search on conversation keywords; vector search for semantically similar memories; and JSON filtering on memory metadata. OceanBase AI Database supports index-based hybrid search across scalar, full-text, and vector data in a single SQL statement, with in-database fusion ranking. Multimodal data can also participate in the search together, without requiring result merging at the application layer. In hybrid search scenarios, asynchronous full-text indexes are also supported, allowing index maintenance to be shifted to background incremental refreshes, improving write and query performance at the cost of some visibility delay.
Real-time consistency
New memories written during a conversation must be immediately available for the next search. After transaction commit, vector indexes, full-text indexes, and JSON indexes become visible immediately, avoiding synchronization delays and data inconsistency caused by writing to multiple systems separately.
Native AI capabilities
OceanBase AI Database provides built-in functions for embedding, vector distance calculation, reranking, model inference, and document chunking, reducing the need for Agent applications to orchestrate separate data-processing pipelines outside the database.
Storage and scalability
Agent memory is typically large in volume and uneven in access patterns. Storage-compute separation and hot-cold tiering can reduce long-term storage cost, while compute and storage can scale independently. RPO=0 is achieved through an independent log service. See the section below for more details on storage-compute separation.
Trial and error: Fork Database provides data sandboxes
Agent evaluation and debugging require repeated experiments on real data, but directly modifying production data is unacceptable, and making a full copy each time is too slow and storage-intensive. Fork Database allows multiple isolated copies to be created quickly from the same baseline data, with each copy used as an experimental sandbox.
- Shared baseline: All copies are created from the same snapshot, so they start from the same state and produce meaningful comparisons.
- Read/Write isolation: Each copy is independent, so incorrect data written in one experiment does not affect other experiments or the baseline data.
- Fast creation, low cost: Forking does not copy the full data set. Instead, it uses copy-on-write to share the baseline and store only incremental changes, making creation much faster than traditional full copies and preventing storage cost from growing linearly with the number of experiments.
- Discardable and mergable: If an experiment does not meet expectations, the branch can simply be dropped without leaving garbage data. Verified results can be merged back into the main branch.
- Comparable and traceable: Experimental results on each branch, including outputs, scores, and bad cases, remain in their respective databases. They can be queried and compared across branches with SQL, and every result can be traced back to the prompt, model parameters, and input context used at the time.
Multimodel integration
OceanBase AI Database brings large objects, AI models, inference results, and business fields under a unified database semantic model, making it easier to store, query, and manage them in a consistent way and turning unstructured data from a cost center into a computable asset.
Tiered LOB storage
In traditional approaches, unstructured files are often stored in object storage or file systems, while the database stores only the file path. Common issues include: files are not database objects, so file state is difficult to roll back together with transactions; permissions must be managed separately, which can lead to inconsistencies between database/table permissions and file permissions; file access requires first querying the database for the path and then accessing object storage, creating a long and high-latency path; and versioning and lifecycle management are difficult to unify.
OceanBase AI Database treats LOBs (large objects) as database objects. Documents, images, audio, and video can coexist with structured fields in the same table, with the database handling transactions, permissions, versions, and queries in a unified way. It also automatically selects the appropriate storage form based on data size and access characteristics. LOBs include three storage forms: InRow, OutRow, and Object Storage. Regardless of the underlying storage form, applications still operate through unified SQL. For applications, a file column is just a normal column, while transactions, indexes, permissions, and versions are all handled uniformly by the database.
Model metadata management (Model in database)
OceanBase AI Database supports registering Register an AI model as database metadata objects and managing them through the PL system package. Supported model types include embedding, text generation, multimodal, and reranking.
After registration, models can be controlled as normal database objects for permissions, and referenced in SQL or table definitions, rather than being managed only as external service endpoints at the application layer. As a result, model invocation, inference write-back, and permission management can all be brought into the same database management framework. After a model is registered, AI functions can be used to chunk and vectorize multimodal files and write the results back to the original table. Full-text indexes can also be built on documents, and vector indexes can be built on embeddings, enabling search and analytics in the same way as relational tables.
Multimodal search
Once multimodal data is ingested, the hybrid search capabilities described above can be reused to combine scalar, JSON, full-text, vector, and other conditions in a single SQL statement. Compared with Agent memory retrieval, multimodal search also commonly involves image semantics and spatial conditions. The main supported search types are as follows:
Query type |
Index type |
Typical use cases |
|---|---|---|
| Scalar filtering | B-tree index | Time ranges, business IDs, statuses, value comparisons |
| JSON filtering | Multivalue index, search index | Nested attributes, tags, and dynamic fields |
| Full-text search | Inverted index | Documents and keyword matching |
| Vector Search | Dense vector indexes (such as HNSW and IVF) and sparse vector indexes | Semantic similarity, image semantic |
| Spatial queries | GIS index | Geolocation locations, spatial ranges, and trajectories |
These capabilities can be combined by the optimizer according to rules and cost, all within a single SQL statement.
Lake-warehouse-database convergence: One system, one technology stack
"Lake-warehouse-database convergence" is not simply about wrapping three systems together. It is about using the same data, the same metadata, and the same SQL semantics, and leveraging a single engine to satisfy the low-cost requirements of a data lake, the analytical capabilities of a data warehouse, and the transactional requirements of a database.
Reduce data movement
The same data serves TP, AP, and AI retrieval at the same time, without repeated synchronization among databases, data warehouses, vector databases, and object storage. Offline processing and multimodal data processing both read from OceanBase AI Database and write back to OceanBase AI Database.
Unified semantics
Transactions, data versions, permissions, indexes, and query entry points are all unified inside the database, avoiding governance issues caused by metadata, files, and vectors being stored across different systems.
Lower cost
Object storage carries massive amounts of cold data, while compute nodes scale independently according to workload, avoiding the need to purchase compute resources just to expand capacity. Single-replica mode minimizes resource cost while still guaranteeing RPO=0.
Simplified operations and maintenance
One engine, one monitoring stack, and one backup and recovery strategy reduce operational complexity and staffing cost.
Faster AI adoption
Structured data, unstructured files, and model inference results are queried under the same SQL semantics, greatly shortening the pipeline for RAG, Agent, and similar scenarios.
RAG
OceanBase AI Database moves the main RAG pipeline—except document parsing—into the database, so that search and answer generation can be completed with SQL after documents are ingested.
Document ingestion
Document chunking, text embedding, and dual-index construction are supported in the database, without the need to synchronize data to external search engines or vector databases.
Document chunking
Long documents are usually split before retrieval. The
AI_SPLIT_DOCUMENT()function can be used to split documents into text chunks by semantics or by fixed length, preserving context while making embedding and indexing easier.Text embedding
The
AI_EMBEDfunction generates vector data for each text chunk, writes it to a vector column, and allows the database to build vector indexes.Dual-index construction
The same set of text chunks can be indexed with two types of indexes at the same time: full-text indexes for keyword search and BM25 ranking, and vector indexes for semantic similarity search. Both are maintained in the database, so there is no need to synchronize them to external search engines or vector databases.
User search
During user search, search and answer generation can be completed entirely in the database through SQL, without additional application-side coding.
Hybrid search
When a user asks a question, a single SQL statement can launch multiple search paths at the same time: vector search uses the question embedding to find semantically related text chunks, keyword search finds exact or near-exact matches from keywords in the question, and scalar filtering narrows the scope using business constraints.
Weighted fusion
Results from multiple search paths can be fused and ranked in the database. Built-in algorithms include RRF (Reciprocal Rank Fusion), which fuses by ranking position;
WEIGHT_SUM, which performs weighted score summation; andMINMAX_NORMALIZER, which fuses after normalization.Reranking and generation
The fused candidate results can be passed to the
AI_RERANK()function to call a reranking model for fine ranking and improve final relevance. TheAI_COMPLETE()andAI_PROMPT()functions can then send the Top-K candidate chunks together with the user question to a large model to generate the final answer.
Extensible AI operators
Embedding, reranking, and text generation steps in the RAG pipeline can be executed directly through built-in AI functions using registered models. In addition to common capabilities such as embedding and reranking, Python UDFs are also supported to extend custom business operators, such as industry-specific preprocessing, rule-based scoring, or customized post-processing logic.
Once created, custom operators can be called in SQL like normal functions and combined with hybrid search, fusion ranking, and answer generation, extending RAG capabilities inside the database instead of pushing critical processing logic into external application services.
Storage-compute separation architecture
OceanBase AI Database uses a storage-compute separation + hot-cold tiering + decoupled log and compute architecture to balance resource cost, reliability, and performance.
Three-layer decoupling
Compute, log, and storage are independent of each other:
Compute layer (OBServer)
OBServer is the database compute node. It receives SQL requests, parses execution plans, schedules parallel tasks, manages transaction context, executes AI functions, and maintains the local hot-data cache. It only handles computation and does not persist the full data set, so compute resources can be purchased and scheduled on demand.
- Stateless: Does not keep a full data copy; only temporary cache and log replay state are stored locally.
- Independent elastic scaling: Compute nodes, log service, and storage layer can each scale independently; adding or removing compute nodes does not require data migration, as new nodes can load data from object storage and replay logs from LogService.
- Single-replica deployment: Since reliability is guaranteed by LogService, compute nodes can operate with a single replica, reducing costs.
- Local SSD cache: Hot data and indexes are cached locally to ensure performance for active queries.
Log layer (LogService)
LogService is an independently deployed distributed transaction log service responsible for transaction log commit, persistence, replication, and replay. It is the foundation of the system’s high availability.
- Independent deployment: Deployed separately from OBServer, so resources do not interfere with each other.
- Three replicas: Deployed with three replicas by default, with majority confirmation guaranteed by Paxos.
- RPO=0, RTO<8 seconds: are acknowledged only after majority confirmation, so committed data is not lost if a compute node fails; in 1F deployment, RTO is on the order of minutes, and in 2F deployment, RTO is less than 8 seconds.
- Fast recovery: When OBServer restarts or scales out, it can recover consistency by replaying logs from LogService.
Storage layer (Object Storage)
Object storage is the final persistence layer for data, storing full data, LOB objects, historical snapshots, and backup data. Any S3-compatible object storage can be used as the backend.
- Low cost: Object storage is much cheaper than local SSDs and is suitable for massive cold data and long-term archiving.
- Near-unlimited capacity: Capacity scales with the object storage limit and is not constrained by a single server’s disks.
- Shared access: Multiple OBServer nodes share the same data set.
- High availability guaranteed by storage backend: Object storage itself provides high availability, so the database layer does not need to maintain multiple data replicas.
Hot and cold data tiering
Putting all data in object storage significantly reduces storage cost. However, if active data must be read from object storage every time, latency becomes unacceptable. Therefore, OceanBase AI Database adds a local SSD hot cache on top of object storage and automatically moves data between the two layers based on access heat:
- Hot data: Recently and frequently accessed data and indexes are cached on local OBServer SSDs to ensure performance.
- Cold data: Infrequently accessed or long-idle data remains in low-cost object storage.
- Automatic identification and migration: The system continuously monitors the hot/cold strategy and data access patterns, automatically migrating cooled data out of SSD and loading warmed data into SSD.