Member-only story
Milvus DB — Milvus Data Model
In my last article, I introduced Milvus database, its basic concept and key features, let’s explore its data model in this article.
Milvus Data Model
Milvus is an open-source vector similarity search engine, which allows storing and indexing large-scale vector data in high-dimensional spaces. The core of how Milvus stores data revolves around the concept of vector embedding and nearest neighbor search algorithms.
The Milvus data model organizes data into collections, partitions, and entities.
Collections
A collection in Milvus is similar to a table in a relational database. It is the primary unit for data management and is composed of entities of the same structure. Each collection is required to have a unique name in the database and must be defined with an entity schema before data can be inserted.
The following Python code creates a empty collection:
from pymilvus import connections, Collection, FieldSchema, DataType, CollectionSchema
fmt = "\n=== {:30} ===\n"
search_latency_fmt…