-
Notifications
You must be signed in to change notification settings - Fork 133
Oracledb connector information #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
953d12f
f4d9819
e5eb914
f1e93b3
f53fd6a
474b117
f7afe13
f625c1d
b236df2
e61bb76
0bd30e5
2a0ba77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,277 @@ | ||||||||
--- | ||||||||
title: Using the Semantic Kernel Oracle Database Vector Store connector (Preview) | ||||||||
description: Contains information on how to use a Semantic Kernel Vector store connector to access and manipulate data in Oracle Database. | ||||||||
zone_pivot_groups: programming-languages | ||||||||
author: minal-agashe-oracle | ||||||||
ms.topic: conceptual | ||||||||
ms.author: | ||||||||
ms.date: 08/14/2025 | ||||||||
ms.service: semantic-kernel | ||||||||
--- | ||||||||
# Using the Oracle Database Vector Store connector (Preview) | ||||||||
|
||||||||
::: zone pivot="programming-language-csharp" | ||||||||
|
||||||||
> [!WARNING] | ||||||||
> The Oracle Database Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. | ||||||||
|
||||||||
::: zone-end | ||||||||
::: zone pivot="programming-language-python" | ||||||||
|
||||||||
> [!WARNING] | ||||||||
> The Semantic Kernel Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. | ||||||||
|
||||||||
::: zone-end | ||||||||
::: zone pivot="programming-language-java" | ||||||||
|
||||||||
> [!WARNING] | ||||||||
> The Semantic Kernel Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. | ||||||||
|
||||||||
::: zone-end | ||||||||
|
||||||||
## Overview | ||||||||
|
||||||||
The Oracle Database Vector Store Connector can be used to access and manage data in Oracle Database. The connector has the following characteristics. | ||||||||
|
||||||||
::: zone pivot="programming-language-csharp" | ||||||||
|
||||||||
| Feature Area | Support | | ||||||||
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||||
| Collection maps to | Oracle database table | | ||||||||
| Supported key property types | <ul><li>short</li><li>int</li><li>long</li><li>string</li><li>Guid</li></ul> | | ||||||||
| Supported data property types | <ul><li>bool</li><li>byte</li><li>short</li><li>int</li><li>decimal</li><li>long</li><li>float</li><li>double</li><li>DateTime</li><li>DateTimeOffset</li><li>TimeSpan</li><li>char</li><li>char[]</li><li>byte[]</li><li>String</li><li>Guid</li><li>*and nullable type of the above types*</i></li></ul> | | ||||||||
| Supported vector property types | <ul><li>ReadOnlyMemory\<float\></li><li>Embedding\<float\></li><li>float[]</li><li>ReadOnlyMemory\<double\></li><li>Embedding\<double\></li><li>double[]</li><li>ReadOnlyMemory\<short\></li><li>Embedding\<short\></li><li>short[]</li><li>ReadOnlyMemory\<byte\></li><li>Embedding\<byte\></li><li>byte[]</li><li>BitArray</li><li>BinaryEmbedding</li></ul> | | ||||||||
| Supported index types | <ul><li>Flat (default)</li><li>HNSW</li><li>IVF</li></ul> | | ||||||||
| Supported distance functions | <ul><li>CosineDistance</li><ul><li>FLOAT32, FLOAT64, and INT8 vector default</li></ul><li>CosineSimilarity</li><li>DotProductSimilarity</li><li>NegativeDotProductSimilarity</li><li>EuclideanDistance</li><li>EuclideanSquaredDistance</li><li>HammingDistance</li><ul><li>BINARY vector default</li></ul><li>ManhattanDistance</li><li>JaccardSimilarity</li></ul> | | ||||||||
| Supported filter clauses | <ul><li>==</li><li>!=</li><li><</li><li><=</li><li>></li><li>>=</li><li>List.Contains() <ul><li>Only when checking for the model property is in the list</li></ul></li></ul> | | ||||||||
|
| Supported filter clauses | <ul><li>==</li><li>!=</li><li><</li><li><=</li><li>></li><li>>=</li><li>List.Contains() <ul><li>Only when checking for the model property is in the list</li></ul></li></ul> | | |
| Supported filter clauses | <ul><li>==</li><li>!=</li><li><</li><li><=</li><li>></li><li>>=</li><li>List.Contains() <ul><li>Only when checking if the model property is in the list</li></ul></li></ul> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Minal-Agashe-Oracle Let's accept this change.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Restricted at least one vector
is already covered by Supports multiple vectors in a record
.
And since none of the connectors support multiple primary keys today, we can probably leave that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Minal-Agashe-Oracle Let's consolidate these two items into a single line item. That should make the points clear.
Supports zero, one, or multiple vectors in a record = Yes
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider putting this in an important highlight
Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. | |
> [!IMPORTANT] | |
> Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Minal-Agashe-Oracle We can accept this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the package released yet? Was going to test the instructions out, but I don't see the package on nuget yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westey-m Not yet. It's likely to be released within the next week.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this one also require a collection name param?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@Minal-Agashe-Oracle You can replace the line of code with
var collection = new OracleCollection<string, Hotel>("<connection string>", "skhotels");
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it still provide a custom mapper? FYI: We did drop this for the other connectors, since it doesn't really work with the linq based filtering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westey-m No, we don't provide a custom mapper. VectorData provides basic custom mappings that use VectorStoreCollectionDefinition.
For LINQ-based filtering, Oracle uses table metadata and data model to filter columns. We took care of this in our metadata layer (mappings between data model to Oracle type) in the Oracle connector.
Our implementation may be different than other connectors. What scenarios do not work well with LINQ-based filtering? We can check those situations out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are not supporting custom mappers, no need to worry. It was something we had originally, but we dropped it. It doesn't work well with linq based filtering, since the model that the user provides and that the linq query is over, does not match the internal db schema, when using a custom mapper.
My comment was really around the fact that the docs here are referring to a custom mapper, and should be revised if there is none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westey-m
Is storage schema definition using record definitions the long-term plan to provide data mapping?
@Minal-Agashe-Oracle
Replace the current paragraph:
The Oracle Database Vector Store connector allows the application to provide a custom mapper in combination with a VectorStoreCollectionDefinition. In this case, the VectorStoreCollectionDefinition can differ from the supplied data model. The VectorStoreCollectionDefinition is used to define the database schema, while the data model is used to interact with the vector store. A custom mapper is required in this case to map from the data model to the custom database schema defined by the VectorStoreCollectionDefinition.
with the following paragraph instead:
The Oracle Database Vector Store connector supports data model annotations and record definitions. With annotations, developers provide information to the data model for creating indexes and database column mapping. With record definitions, the information can be defined and supplied separately from the data model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is storage schema definition using record definitions the long-term plan to provide data mapping?
@alexkeh, the type of mapping that we had previously supported via custom mappers was e.g. turning nested structures into flat ones and similar complex remapping. Record definitions in my mind is more about defining the schema, and there is typically a fairly standard 1 to 1 mapping from schema to model that we follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check out the index.md file in the same folder as this file. It has a table of all the connectors, which can be updated for .net.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! We're working on updating the index.md as well.