Database connectors

Connecting an application’s data model and queries to a database, including the differences in supported queries, types and schema management between database implementations. Changing an existing schema belongs to schema evolution.

Overview

InCAPassessed

Which database the model actually runs on, and what changes when it is not the default one — the choice that is invisible until a query behaves differently. HANA Cloud is the default under a CAP application: HDI containers, calculation views, and the features the core reaches for first. PostgreSQL through @cap-js/postgres is the alternative when the answer is not HANA, with its own schema evolution and no HDI.

SAP SHIPSby design
Node.js →

@cap-js/postgres The PostgreSQL database service — the production option for running CAP off HANA, sharing the base service with the other three.

@cap-js/sqlite The SQLite service, in memory during the inner loop — which is why a CAP project runs before anyone has provisioned a database.

@sap/cds Defines cds.DatabaseService, the technical service every database package subclasses, and auto-wires the installed one, SQLite, SAP HANA or PostgreSQL, for the active profile.

Java →

com.sap.cds:cds-feature-hana The CAP Java feature that wires a Maven application to SAP HANA Cloud, the production default among CAP's supported databases.

com.sap.cds:cds-feature-jdbc Connects the CAP Java runtime to JDBC databases through the CDS4j JDBC runtime: H2 and SQLite, which capire names for local development and CI tests rather than enterprise use.

com.sap.cds:cds-feature-postgresql The CAP Java feature that wires a Maven application to PostgreSQL as its datasource beside SAP HANA, with limitations capire lists: schema evolution first, and no multitenancy or extensibility yet.

com.sap.cds:cds-services-bom Creates a CQN-based Persistence Service from the configured datasource for SAP HANA, PostgreSQL, H2 or SQLite, and serves it as the database client.

Not covered: At those four. Anything else — DB2, MySQL, MongoDB, Snowflake — is an adapter somebody wrote against the same service interface, and the further the store is from relational the more of the interface it has to reinterpret.

SourceDatabases — capirechecked
InBTP/BAIPassessed

On BTP the database is a service you provision rather than a dependency you install, and the choice is made before any model exists. SAP HANA Cloud is the default and what everything analytical above it sits on; PostgreSQL is the managed alternative from the underlying hyperscaler.

SAP SHIPS

Present, not yet described.

Not covered: At provisioning. The platform offers the databases and the plans; which one a model runs against, and what changes when it is not HANA, is decided in the application and read on the CAP door.

The providers here are SAP’s own: managed databases such as SAP HANA Cloud and SAP ASE, and the HANA drivers for Node.js, hdb and SAP HANA client. Core-only reads the catalogue and SAP’s drivers, and is not a quote from the core.

THE COMMUNITY ADDS

No community artifact is documented here.

InABAPassessed

On ABAP the database a client connects to is the ABAP system itself: the ODBC driver for ABAP lets an outside program run SQL against CDS objects the system has published.

SAP SHIPS

The ODBC driver for ABAP runs SQL from an external program against CDS objects an ABAP system exposes as an SQL service: queries from release 2021 FPS01, procedure calls from 2025 and inserts and deletes from 2508.

Not covered: At the exposed objects and the client machine. A program reaches only what the system publishes as an SQL service, and the driver is downloaded from SAP and installed on every client, on Unix under unixodbc and no other driver manager.

Core-only rests on the ODBC driver for ABAP, which odbc-driver-for-abap-examples demonstrates, and on SAP HANA, which ABAP manages and calls through AMDP.

THE COMMUNITY ADDS

No community artifact is documented here.

Licence1

LicenceSAP Developer License Agreement 3.2 CAP§ 1AlwaysA covered CAP application uses a connector to copy or persist SAP product data in a non-SAP database product.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.

The connector itself does not decide the licence boundary. Section 1 makes the destination and purpose of extraction relevant, including the scoped exception for interoperability with an SAP product.

SAP Developer License Agreement 3.2 CAP →

Artifacts26

Group by26 of 26 artifacts
ArtifactSignals
CDS plugins11
@cap-js/hanaSAP HANA database service for CAP
Signals
Use terms
@cap-js/postgresPostgreSQL database service for CAP
Signals
Use terms
@cap-js/sqliteSQLite database service for CAP, in memory during development
Signals
Use terms
@neoimpulse/cap-js-restore-model-defined-typesCAP plugin casting read values back to CDS model types
Signals
Use terms
@quadrio/cds-db2DB2 adapter for CDS
Signals
Functional boundary+1
@sap/cds-hanaDatabase adapter for SAP HANA in CAP
Signals
Use terms
cap-postgres-btp-connectivityTunnels CAP Node.js to a private PostgreSQL via Cloud Connector
Signals
Use terms
cap-snowflakeCAP database adapter for Snowflake with OData V4 support
Signals
Functional boundary+1
cds-mongodbMongoDB as a CAP database service through Mongoose
Signals
Functional boundary+1
cds-mysqlMySQL and MariaDB database adapter for CAP
Signals
Functional boundary+1
cds-pgPostgreSQL adapter for SAP CDS from the SAP Mentors community
Signals
Archived+1
CLI tools1
@cds-pgroll/postgresCLI for DROP and RENAME schema changes beside @cap-js/postgres
Signals
none
Packages9
@cap-js/db-serviceBase service shared by CAP's SQLite, PostgreSQL and HANA services
Signals
none
@sap/cdsCAP Node.js runtime
Signals
none
@sap/hana-clientSAP's Node.js driver for SAP HANA
Signals
none
com.sap.cds:cds-feature-hanaSAP HANA Cloud datasource for CAP Java applications
Signals
none
com.sap.cds:cds-feature-jdbcJDBC runtime for H2 and SQLite in CAP Java
Signals
none
com.sap.cds:cds-feature-postgresqlPostgreSQL datasource for CAP Java applications
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none
hdbPure JavaScript SAP HANA driver for Node.js
Signals
Functional boundary
SAP-samples/hana-hdbext-promisfied-examplePromise-based wrappers around the SAP HANA client libraries
Signals
none
Platforms1
SAP HANASAP's relational database platform, on-premise and in HANA Cloud
Signals
Functional boundary
Services4
PostgreSQL on SAP BTP, hyperscaler optionManaged PostgreSQL from the hyperscaler via a BTP service binding
Signals
none
SAP ASE ServiceManaged SAP ASE databases on BTP for Java applications
Signals
none
SAP HANA CloudManaged SAP HANA database service on BTP
Signals
Functional boundary
SAP HANA Service (SAP Regions) for SAP BTPManaged SAP HANA 2.0 databases in fixed sizes on SAP BTP
Signals
none

Content65

Group by65 of 65 pieces
Piece, what it offers
Bridging Python and SAP HANA: Inside the sqlalchemy-hana Open-Source Dialect
YouTube — SAP Developers playlists, SAP Developers, Talk
CAP Foundry: Engineering SAP CAP Applications from Business Intent with Guardrailed AI
SAP Community, Shahid, Blog
Connect SAP CAP (Node.js) to On-Premise/Private PostgreSQL using SAP Cloud Connector
SAP Community, Kalaikovan, BlogThe reasoningA recipe
Core changed
Show 56 more
Fullstack CAP Application with HANA Cloud (Decoupled Architecture) [Part-4]
SAP Community, sanjucs, BlogThe reasoningA recipe
Core changed
Fullstack CAP Application with HANA Cloud (Decoupled Architecture) [Part-3]
SAP Community, sanjucs, BlogThe reasoning
Fullstack CAP Application with HANA Cloud (Decoupled Architecture) [Part-1]
SAP Community, sanjucs, BlogThe reasoningA recipeRunnable code
Core changed
Building a CAP App with Fiori Integration – Part 1: Environment & HANA Cloud Setup
SAP Community, SuryaRamesh, part 1 of 2, BlogThe reasoning
A Use Case for HANA Cloud Knowledge Graph: AI‑Driven Tender Analysis
SAP Community, giacomo_dantonio, BlogThe reasoning
SAP CAP on HANA XSA: Scaling Industrial Data Applications Beyond the Cloud
SAP Community, rgadirov, BlogThe reasoningRunnable code
Core changed
Part 2: Creating and Deploying a CAP Application with PostgreSQL, Hyperscaler Option
SAP Community, yashbhosle789, part 2 of 2, BlogThe reasoningA recipe
Core changed
Part 1: Creating and Deploying a SAP CAP Application with SAP HANA on SAP BTP (Cloud Foundry)
SAP Community, yashbhosle789, part 1 of 2, BlogThe reasoningA recipe
Core changed
Setting Up PostgreSQL for SAP BTP Development: A Practical Guide
SAP Community, michal_majer, BlogThe reasoningA recipeRunnable code
Create a CAP Application with SAP HANA Cloud from Scratch and Deploy to Cloud Foundry
SAP Community, MaheshSirsat1708, BlogThe reasoningA recipe
Core changed
Creating a Hybrid CAP (Node.js) Profile with PostgreSQL on BTP from Business Application Studio
SAP Community, valentincadart, BlogThe reasoningRunnable code
Core changed
Lets Talk to the Database - CAP & SQLite Powered by Google Gemini-2.5-Pro
SAP Community, ShivamShuklaSAP, BlogThe reasoning
SAP CAP With Prostgres Serice in BTP
SAP Community, satya-dev, Blog
Using HANA Cloud’s "VECTOR_EMBEDDING" Function in CAP
SAP Community, Mio Yasutake, BlogThe reasoningRunnable code
CAPM Basics - Part 2
SAP Community, archisman92, Blog
SAP CAP Lessons Learned: SQLite is single threaded, HANA is not
SAP Community, LucasMagriniRigo, Blog
SAP CAP Lessons Learned: Run a CAP app using SQLite on SAP BTP - Cloud Foundry
SAP Community, LucasMagriniRigo, BlogThe reasoning
Configure an SAP CAP Application to Connect to an SAP HANA Cloud Database in Another Global Account or Subaccount
SAP Community, JhoelAnthonyRamosRomeroPE, BlogThe reasoning
SQLite as database for a multi-target (/productive) CAP Application
SAP Community, Christopher_Ketzler, BlogThe reasoningA recipeRunnable code
Core changed
Using Postgresql Database in Cloud Application Programming model
SAP Community, Arun Krishnamoorthy, BlogThe reasoningA recipeRunnable code
Core changed
Sharing SAP HANA Cloud instance to multiple subaccounts and creating HDI containers
SAP Community, Kazuhiko Takata, BlogThe reasoningRunnable code
Core changed
2024/01最新版!Productivity Toolsを使ったCAPバックエンド開発②~HANA Cloud編~
SAP Community, takayuki_tanaka, BlogA recipe
Core changed
CAP PostgreSql setup local debugging using Docker - Part 2
SAP Community, ramonlee5, BlogA recipe
Core changed
CAP with PostgreSQL DB alternate to HANA Cloud DB - Part 1
SAP Community, ramonlee5, BlogThe reasoning
Exposing Calculation View with Dynamic Client via OData API
SAP Community, Willem Pardaens, BlogThe reasoningA recipeRunnable code
Open Sourcing CAP – how to learn more or get involved
SAP Community, Fempel, Blog
Hybrid testing using PostgreSQL on SAP BTP, hyperscaler option
SAP Community, martinfrick, Blog
SAP CAP (Java) with Amazon Aurora PostgreSQL
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningA recipeRunnable code
Core changed
SAP CAP (Java) with Azure Cosmos DB for PostgreSQL
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningA recipeRunnable code
Core changed
Run and Deploy SAP CAP (Java) with PostgreSQL using Official Database Adapter @cap-js/postgres
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningA recipeRunnable code
Version drift
Lets Deep dive into CAPM and HANA Cloud --> HANACap
SAP Community, shivamshukla12, BlogThe reasoningRunnable code
Core changed
Run and Deploy SAP CAP (Node.js or Java) with PostgreSQL on SAP BTP Cloud Foundry
SAP Community, TiaXu, BlogThe reasoningA recipeRunnable code
Core changed
Run and Deploy SAP CAP (Java) with PostgreSQL on SAP BTP Cloud Foundry
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningRunnable code
1 stale part
[BTP HANA Cloud Database] : How to access HANA Cloud Database & HDI Container in BTP
SAP Community, showkath_naseem, BlogThe reasoningA recipeRunnable code
SFSFとHANA Cloudを使用するCAPのアプリケーション開発
SAP Community, rasai, BlogA recipeRunnable code
Core changed
How to create an API to run a HANA Cloud Stored Procedure in Cloud Foundry
SAP Community, gonzalo_hernan_sendra, BlogThe reasoningRunnable code
Core changed
Upload data from excel in CAP (Node.js)
SAP Community, KM11, BlogRunnable code
Core changed
Distributed Resiliency of SAP CAP applications using SAP HANA Cloud (Multi-Zone Replication)
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoning
Useful CAP CDS and Fiori Commands to Accelerate Development and Deployment
SAP Community, TiaXu, Blog
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview
SAP Community, Tristan, BlogThe reasoningA recipeRunnable code
Core changed
How I migrated my on-prem xsa cds3+hana solution to cds6+sqlite
SAP Community, alex_myakinkii, BlogThe reasoningRunnable code
Core changed
Extend SAP SuccessFactors on SAP BTP with CAP - Deploy to SAP HANA Cloud
SAP Community, ale_biagi, BlogThe reasoning
Create a Business Service using CDS, Node.js, SQLite and a OData service
SAP Community, raybanton, BlogThe reasoningA recipeRunnable code
Core changed
Deploying CAP services with the in-memory SQLite database
SAP Community, liam_mischewski, BlogThe reasoning
cds deploy to sqlite in-memory database
SAP Community, AndrewBarnard, Blog
Simple steps to deploy your CAP project to HANA cloud
SAP Community, OmPrakashJha, BlogThe reasoning
SAP BTP Showcase - Use SAP Cloud Application Programming to do Native Development on HANA Cloud
SAP Community, former_member271284, BlogThe reasoningA recipeRunnable code
Core changed
SAP BTP Showcase – SAP Continuous Integration and Delivery (SAP CI&D) for SAP HANA Cloud
SAP Community, gcalixtos, BlogThe reasoningRunnable code
Core changed
SAP Business Application Studio – Using SAP HANA Tools with SAP Cloud Application Programming Model projects
SAP Community, Former Member, BlogThe reasoningA recipeRunnable code
Core changed
My Learnings in SAP-CAP Using MongoDB
SAP Community, krish469, BlogThe reasoningRunnable code
Gone quiet
SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1
SAP Community, rasai, part 1 of 2, Blog
First Java Cap Application
SAP Community, bruce_wang3, Blog
Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
Getting started with CAP on PostgreSQL (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
PostgreSQL persistence adapter for CAP (Node.js)
SAP Community, Volker Buzek, BlogThe reasoningRunnable code
Superseded
Use SAP HANA as the Database for a CAP Java Application
SAP Developer Center, SAP, TutorialThe reasoningA recipe
Accelerating Your Analytics with Delta Table Replication into SAP HANA Cloud
SAP Community, SeungjoonLee, Blog
Talking to your database: The new data exploration tools in SAP HANA Cloud
SAP TechEd — session catalogue, TalkThe reasoning
Build AI agents and applications natively on SAP HANA Cloud
SAP TechEd — session catalogue, TalkThe reasoning
Show 3 more
Road map for SAP HANA Cloud: What’s next for the AI database
SAP TechEd — session catalogue, Thomas Hammer, TalkThe reasoning
SAP HANA Cloud: The data foundation for contextualizing and reasoning
SAP TechEd — session catalogue, TalkThe reasoning
SAP HANA Cloud as the AI database for SAP Business Data Cloud
SAP TechEd — session catalogue, Thomas Hammer, TalkThe reasoning
SAP CAP With Prostgres Serice in BTP
SAP Community, satya-dev, Blog
SAP CAP With Prostgres Serice in BTP
SAP Community, satya-dev, Blog
Run and Deploy SAP CAP (Java) with PostgreSQL using Official Database Adapter @cap-js/postgres
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningA recipeRunnable code
Version drift
Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
Getting started with CAP on PostgreSQL (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
Bridging Python and SAP HANA: Inside the sqlalchemy-hana Open-Source Dialect
YouTube — SAP Developers playlists, SAP Developers, Talk
Run and Deploy SAP CAP (Java) with PostgreSQL using Official Database Adapter @cap-js/postgres
SAP Community, shanthakumar_krishnaswamy, BlogThe reasoningA recipeRunnable code
Version drift
Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
Getting started with CAP on PostgreSQL (Node.js)
SAP Community, Mike Zaschka, BlogThe reasoningRunnable code
1 stale part
PostgreSQL persistence adapter for CAP (Node.js)
SAP Community, Volker Buzek, BlogThe reasoningRunnable code
Superseded

Seen working9

ArtifactSignals
Samples9
bookshop-demoSimple CDS bookshop model used across CAP explanations
No license
btpvulnerabilityreportCAP and Fiori app showing BTP Application Vulnerability Report data
No license
cap-cross-containerCAP services reading each other's HANA tables across HDI containers
No license
capire/bookstoreComposite CAP app from separately deployed services
none
hxe-hibernate-google-app-engineJava demo running Spring and Hibernate against SAP HANA
none
odbc-driver-for-abap-examplesExample programs for the ODBC driver for ABAP in several languages
none
pg-beershopCAP beershop on PostgreSQL, predating an official adapter
none
sap-cap-mongodbCAP service reading and writing MongoDB from custom handlers
No license
SAP-samples/cap-hana-exercises-codejamCodeJam building a full-stack CAP app on SAP HANA Cloud
none

Details

What changed — and what it makes stale2
@sap/cds 10.1.0, CAP, Node.js

The sqlite:memory preset configures an in-memory SQLite database in all profiles, including production, for edge cases such as an in-memory cache. Before, SQLite was the development and test database and production meant SAP HANA or PostgreSQL.

Makes stale:

Advice that SQLite cannot be configured for the production profile at all.

@sap/cds 8.0.3, CAP, Node.js

Before cds8, @cap-js/sqlite and @cap-js/postgres were beta previews of a new database-service architecture begun in cds7, and PostgreSQL support in practice meant the community's cds-pg adapter. cds8 concluded that rewrite: @cap-js/sqlite, @cap-js/postgres and @cap-js/hana all reached general availability and became the defaults, sharing one query-translation layer. The 8 line reached npm on 2024-07-12; 8.0.3 was its first published release.

Makes stale:

Setup guidance that adds cds-pg for PostgreSQL or treats the @cap-js database services as beta-only. cds-pg was archived in July 2023 in favour of @cap-js/postgres, and since cds8 the @cap-js services are what a new project gets by default.

Coverage
statecore and community, CAP
assessed
state in BTP/BAIPcore only, assessed
state in ABAPcore only, assessed
relationshipnarrow by design
also inBTP/BAIP, ABAP
SourceDatabases — capirechecked SourceUsing SQLite for Development — capirechecked SourceUsing SQLite for Development — capirechecked SourceUsing SQLite for Development — capirechecked SourceCAP-Level Database Support — capirechecked SourceUsing Databases — capirechecked SourceUsing Databases — capirechecked SourceUsing PostgreSQL — capirechecked SourceUsing PostgreSQL — capirechecked SourceDatabase Services — capirechecked SourcePersistence Services (CAP Java) — capirechecked SourceUsing H2 for Development in CAP Java — capirechecked SourceUsing H2 for Development in CAP Java — capirechecked
For your agent
Ref
capability:database-connectors
JSON
/capabilities/database-connectors.json
MCP
Connecting an agent