For any application, the data where it is being stored is critical. So far, we have been storing the data in a structured format(tables) and an unstructured format(json), and now we have a new thing called a vector database.
What are these Vector Databases?
A vector database is a type of database that stores data as high-dimensional vectors. Each vector has a certain number of dimensions, which can range from tens to thousands, depending on the complexity and granularity of the data. In short, the data or the text is turned into a decimal array and stored in the backend.
SQL or Oracle does not support these Vector databases; below is the list of databases where these Vector data can be stored.
- Azure Cognitive Search
- Chroma
- CosmosDB
- DuckDB
- Milvus
- Pinecone
- Postgres
- Qdrant
- Redis
- SQLite
- Weaviate
Among the above list of vector databases, let's discuss on few databases like Postgres, Qdrant, and Cosmos with MongoDB VCore
Postgres
Recommend to use Postgres in the case have knowledge of the Postgres database, as it eases the storing or using multiple databases like storing structured data in structured db and vector data in another database.
Postgres supports the vector data stored under the flexible server type, which is called pgvector. Make sure your local machine has outbound communication to port 5432 to access the Postgres database.
Data retrieval from Postgres can be achieved by using npgsql, Dapper, or EntityFramework.
The bare minimum to create Postgres is cheaper compared to other databases.
Below is the sample reference of Vector datatype in Postgres, which is used to store the embedding data.

Below is the sample query which can be used to retrieve the data from Postgres.
string prompt = "seller name?";
var promptEmbeddings = await _openAI.Get.embeddingsAsync(prompt, null);
var promptSql = $"SELECT payload FROM contracttable ORDER BY embedding <-> '[{string.Join(',', promptEmbeddings)}]' LIMIT 5";
Pros
- Postgres db is already being used by multiple users, so adaption to use the database would require less minimal effort.
- Cost is also less compared to other vector db.
Qdrant
Qdrant is an open-source vector database, which we can use by deploying the docker image to Kubernetes for HA, or a quick deployment we can deploy to Azure Container Instance(ACI).
In case we try to ACI Qdrant db, make sure you mount the data to Azure blob storage because in case we save the data on the container, then in case of restart of the pod the data will be lost, and we need to store it again. In the case of C# developer, we can use the nuget of ZeroLevel to access the API's of Qdrant.
Qdrant comes with an Enterprise Licensing Production environment, which can be used for the production environment. We can deploy to Kubernetes in case we want to have HA of the Qdrant db.




Join the conversation! Your thoughts help the community grow.