MCPcopy Index your code
hub / github.com/anders-swanson/oracle-database-code-samples

github.com/anders-swanson/oracle-database-code-samples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,987 symbols 5,299 edges 355 files 92 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Oracle AI Database Samples

You may also browse all samples here: https://anders-swanson.github.io/oracle-database-code-samples/

Have a code sample you'd like to contribute? See the contributor guide.

New to Oracle AI Database? Start Here

Navigating this repository

Each module in this project contains a separate Oracle AI Database sample, mainly implemented in Java. Use the README to find a sample you're interested in, or navigate to the directory of your choice.

Samples in other languages

Java Oracle AI Database Code Samples

Collection of Java samples and demo applications using Oracle AI Database, with a focus on the converged database architecture.

Sample Project Description
AI Vector Search Implement AI Vector Search with Oracle AI Database over JDBC to find semantically similar documents. The OracleVectorSample class provides a reference implementation for Vector Search with Oracle AI Database.
Database Per Service Example Demonstrates the database-per-service pattern with separate Oracle AI Database pluggable databases (PDBs), one Spring Boot service per PDB, and an application-layer composition runner.
JDBC Hybrid Search Combine semantic vector similarity with relational filters and JSON metadata predicates in one Oracle AI Database JDBC query.
JDBC JSON Oracle Text Demonstrate Oracle Text JSON full-text search over plain JDBC with native JSON columns, JSON search indexes, ranked json_textcontains queries, and NEAR proximity search.
JDBC UUID Primary Keys Store Java UUID primary keys in Oracle AI Database as compact RAW(16) values using explicit JDBC byte conversion.
LangChain4j Agent Memory Use LangChain4j with Oracle AI Database as durable agent memory, combining AI Vector Search, Oracle Text over JSON memories, and writeback of new handoff context.
JSON Data and Duality Views Sample Java applications using the Oracle JSON Data type and Oracle AI Database JSON Relational Duality Views.
Oracle AI Database JDBC Event Streaming Stream events with Oracle AI Database TxEventQ using plain JDBC! The producer and consumer invoke stored procedures to send and receive asynchronous messages on Oracle AI Database Transactional Event Queues.
Oracle AI Database JDBC Property Graph Basic Oracle Property Graph sample over JDBC using CREATE PROPERTY GRAPH, GRAPH_TABLE, Testcontainers, and an SVG diagram of the sample vertices, edges, and query results.
Oracle AI Database JDBC Spatial Example Basic Oracle Spatial sample over JDBC using JGeometry, SDO_FILTER, SDO_WITHIN_DISTANCE, SDO_GEOM.SDO_DISTANCE, and an SVG diagram of the sample geometries and distances.
Oracle AI Database JMS Producer Consumer Example Example using Oracle AI Database JDBC to produce and consume messages over the JMS API. Includes examples using topics for JMS multi-consumer pub/sub, and JMS queues (point-to-point).
Migrate Apache Kafka to Oracle AI Database TxEventQ Sample that demonstrates how to migrate an Apache Kafka application to use Oracle AI Database Transactional Event Queues
MCP Agent with SQLcl and Langchain4j Simple example using Langchain4j's agent SDK to integrate with the SQLcl MCP server for an agentic natural language database interface.
News Event Streaming Converged Database App Demo Converged Database app using Transactional Event Queues, JSON Relational Duality Views, AI Vector Search, and Relational components of Oracle AI Database. The app integrates with OCI GenAI to process, embed, and serve news articles.
Oracle AI Database Kafka APIs Producer, consumer, and transactional messaging code samples using the Kafka Java Client for Oracle AI Database Transactional Event Queues.
ORDS Docker Compose 2-container setup for ORDS using Oracle AI Database Free
ORDS Testcontainers Run Oracle REST Data Services (ORDS) with Testcontainers against Oracle AI Database Free using a reusable Java container setup.
Sessionless Transactions Learn how to use Sessionless Transactions to run database operations with no persistent client-side session or connection.
Spring Boot Dynamic Property Source Demonstrates implementing dynamic Spring Boot property sources using Oracle AI Database as a property store. Valuable for Spring Developers who want to get the most out of their configuration management.
Spring Boot Custom JDBC Tracer Implement a custom OpenTelemetry tracer for the Oracle AI Database JDBC driver (OJDBC)
Spring Boot OJDBC Tracing How to trace Oracle AI Database JDBC connections with OpenTelemetry.
Spring Data MongoDB Oracle API Demonstration of using Oracle AI Database's MongoDB compatible API with Spring Data MongoDB.
Spring JPA Example Learn Spring JPA by example with Oracle AI Database Free.
Spring Boot CDC with JMS Create a simple, asynchronous, event-driven CDC implementation using Spring JMS and Oracle AI Database Transactional Event Queues.
Spring Boot Database Client Info Set database client info in your connections, viewable in views like V$SESSION.
Spring Boot JMS Example Learn how to use Oracle AI Database Transactional Event Queues with the Java JMS API for asynchronous event-streaming.
Spring Boot JMS Tracing Sample traces from your Spring JMS applications using Oracle AI Database Transactional Event Queues
Spring Boot Resource Loader Access Oracle AI Database blobs using the Spring Resource API.
Spring Cloud Config Server Client/server example using Oracle AI Database as a JDBC backend for Spring Cloud Config
Spring Vault Oracle App Sample application demonstrating how to dynamically load Oracle Cloud Infrastructure (OCI) Vault key/values as Spring properties leveraging Spring Cloud Oracle.
Support Ticket Intelligence Spring Boot support workflow sample combining Oracle AI Database TxEventQ, JSON, Oracle Text, vector search, SQL property graph, and JSON Relational Duality Views.
TxEventQ Examples Assorted messages examples with Oracle AI Database Transactional Event Queues, including Kafka, JMS, PL/SQL, and ORDS.
[T

Extension points exported contracts — how you extend this code

OKafkaTask (Interface)
(no doc) [2 implementers]
news-event-streaming/src/main/java/com/example/news/events/producerconsumer/OKafkaTask.java
OpsMemoryAssistant (Interface)
(no doc) [1 implementers]
langchain4j-agent-memory/src/main/java/com/example/memory/agent/OpsMemoryAssistant.java
MovieRepository (Interface)
(no doc) [1 implementers]
spring-jpa/src/main/java/com/example/relationships/repository/MovieRepository.java
OrdsContainerOption (FuncType)
(no doc)
golang/testcontainers/ords_container.go
SQLclMCPAgent (Interface)
(no doc)
mcp-agent/src/main/java/com/example/mcp/SQLclMCPAgent.java
StudentRepository (Interface)
(no doc)
spring-data-mongodb-oracle-api/src/main/java/com/example/mongodb/StudentRepository.java
JpaOrderRepository (Interface)
(no doc)
jdbc-uuid/src/main/java/com/example/uuid/jpa/JpaOrderRepository.java
Values (Interface)
(no doc)
txeventq-examples/src/main/java/com/example/txeventq/Values.java

Core symbols most depended-on inside this repo

get
called by 138
database-per-service-example/sample/src/main/java/com/example/sample/HttpUtil.java
add
called by 86
ai-vector-search/src/main/java/com/example/OracleVectorSample.java
getConnection
called by 76
spring-boot-database-client-info/src/main/java/com/example/clientinfo/ClientInfoDataSource.java
toString
called by 67
json/crud-duality-views/src/main/java/com/example/jdv/crud/Order.java
execute
called by 42
langchain4j-agent-memory/src/main/java/com/example/memory/search/MemoryRepository.java
assertEquals
called by 36
database-per-service-example/sample/src/main/java/com/example/sample/DatabasePerServiceSampleRunner.java
getPassword
called by 30
typescript/src/testcontainers/generic_oracle_database_container.ts
getUsername
called by 29
typescript/src/testcontainers/generic_oracle_database_container.ts

Shape

Method 1,326
Class 349
Function 257
Interface 45
Struct 8
Enum 1
FuncType 1

Languages

Java80%
TypeScript12%
Python6%
Go2%

Modules by API surface

website/src/lib/catalog.ts30 symbols
python-oracle/src/python_oracle/langgraph_persistence/travel_approval_graph.py27 symbols
python-oracle/src/python_oracle/langchain_retrieval/runbook_retrieval.py26 symbols
jdbc-hybrid-search/src/main/java/com/example/hybrid/diagram/DiagramGenerator.java25 symbols
database-per-service-example/courses/src/main/java/com/example/courses/Course.java25 symbols
golang/testcontainers/ords_container.go24 symbols
website/vite.config.ts23 symbols
migrate-kafka-to-oracle/kafka-app/src/main/java/com/example/kafka/WeatherEvent.java23 symbols
migrate-kafka-to-oracle/kafka-app-step-3/src/main/java/com/example/kafka3/WeatherEvent.java23 symbols
migrate-kafka-to-oracle/kafka-app-step-2/src/main/java/com/example/kafka2/WeatherEvent.java23 symbols
migrate-kafka-to-oracle/kafka-app-step-1/src/main/java/com/example/kafka1/WeatherEvent.java23 symbols
typescript/src/testcontainers/ords_container.ts22 symbols

Datastores touched

compat_goCollection · 1 repos
(mongodb)Database · 1 repos

For agents

$ claude mcp add oracle-database-code-samples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact