Introduction
Hint
This article is generated by AI translation.
jdbc-milvus is a Milvus vector database JDBC driver adapter that allows developers to operate Milvus using standard JDBC interfaces and SQL-style commands. Its purpose is to enable developers to seamlessly use Milvus vector database through the familiar JDBC programming model.
Core Features
- JDBC compatible — implements standard JDBC interfaces for seamless integration with any JDBC-compatible framework.
- SQL-style syntax — operates Milvus using standard SQL structures like
CREATE TABLE,INSERT,SELECT,DELETE. - Vector search support — expresses KNN search via
ORDER BY field <-> vector, and range search viaWHEREclauses. - Rich command set — supports database management, table management, index management, partition management, user and permission management, and more. See the Syntax Manual for details.
- Supports command parameter placeholder
?, with parameters set viaPreparedStatement. - Full DDL support — includes collection creation (with vector field definitions), index creation (with index types and parameters), partition and alias management.
- Supports
Statement.RETURN_GENERATED_KEYS, automatically returning the generated primary key on insert operations. - Supports SQL Hints to override query
LIMIT,OFFSET, or convert queries to Count operations. - Supports command interceptors for logging, performance monitoring, and similar scenarios.
- Flexible vector formats — supports JSON array literals,
?parameter binding (List<Float>,float[], etc.), and batch vector search.
Architecture Design
jdbc-milvus internally uses the Milvus Java SDK for communication, parses SQL-style commands via ANTLR4, and converts them to Milvus SDK API calls.
Use Cases
- Accessing Milvus vector database in a unified way (JDBC) within Java projects.
- Operating Milvus with SQL-style syntax to reduce the learning curve.
- Integrating Milvus into existing JDBC-based data processing pipelines.
Compatibility
- JDK: 8+
- Milvus: 2.3.x or higher recommended (some features like
COUNTrequire 2.2+)