CapabilityData & PersistenceNode.js, read from its artifacts

Database connectors

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.

Showing artifacts, examples and content with confirmed Node.js applicability. View All CAP

Overview

SAP SHIPS
@cap-js/postgres

The PostgreSQL database service for CAP Node.js, on the same database services architecture as the SQLite and SAP HANA services; CAP Java runs on PostgreSQL through its own JDBC feature.

SourceUsing PostgreSQL — capirechecked
@cap-js/sqlite

Auto-configures an in-memory SQLite database for the development profile through the cds-plugin technique, a persistent file when configured, and since @sap/cds 10.1.0 the sqlite:memory preset in any profile.

@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.

SourceDatabase Services — capirechecked

A Node.js coverage assessment has not been written. View all flavors

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 →

Artifacts18

18 of 18 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
Packages3
@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
Platforms1
SAP HANASAP's relational database platform, on-premise and in HANA Cloud
Signals
Functional boundary
Services2
PostgreSQL on SAP BTP, hyperscaler optionManaged PostgreSQL from the hyperscaler via a BTP service binding
Signals
none
SAP HANA CloudManaged SAP HANA database service on BTP
Signals
Functional boundary

Content7

Group by
Piece, what it offers
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
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
Show 4 more
My Learnings in SAP-CAP Using MongoDB
SAP Community, krish469, BlogThe reasoningRunnable code
Gone quiet
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
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
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 working4

ArtifactSignals
Samples4
bookshop-demoSimple CDS bookshop model used across CAP explanations
No license
btpvulnerabilityreportCAP and Fiori app showing BTP Application Vulnerability Report data
No license
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, Node.js, derived
also inBTP/BAIP, ABAP
For your agent
Ref
capability:database-connectors
JSON
/capabilities/database-connectors.json
MCP
Connecting an agent