Drivers and APIs
Applications connect to CoraDB through the broker (default port 33000), which hands each connection to a CAS process attached to the database. Every official driver speaks the broker's CAS protocol directly: none of them needs the CCI C library or any other native component, so they install with the usual package manager of their language and run on Windows, Linux and macOS alike.
| Language | Driver | Package | Requirements | Guide | API reference |
|---|---|---|---|---|---|
| Java | CoraDB JDBC driver | coradb_jdbc.jar (in $CORADB/jdbc) |
Java 7+ | JDBC | JDBC |
| JavaScript / TypeScript | node-coradb | npm @coradb/node-coradb |
Node.js 20+ | Node.js | Node.js API |
| PHP | coradb-php | Composer coradb/coradb |
PHP 8.2+, 64-bit | PHP | PHP API |
| C# / .NET | CoraDB.Data (ADO.NET) | CoraDB.Data assembly / NuGet package |
.NET 8 | ADO.NET | ADO.NET API |
| Python | pycoradb (DB-API 2.0) | pycoradb |
Python 3.10+ | Python | Python API |
| C / C++ | CCI (C Client Interface) | libcascci (in $CORADB/lib) |
— | CCI guide | CCI API |
All drivers support the whole SQL language of CoraDB, including graph queries with SELECT … MATCH: a graph query is sent and read like any other SELECT.
Common connection settings
Section titled “Common connection settings”| Setting | Default | Notes |
|---|---|---|
| Host | localhost |
Most drivers also accept a list of brokers (alternative hosts), tried in order when a broker cannot be reached, optionally load-balanced. |
| Port | 33000 |
The broker port (BROKER_PORT in coradb_broker.conf). |
| Database | — | For example e-commerce, or another demo database. |
| User | public or dba, depending on the driver |
See Users & privileges. |
| Password | Empty | |
| TLS | off | Needs a broker with SSL=ON; not available in the Node.js driver. Certificates are not verified by default, because brokers usually use self-signed ones. |
Migrating from the CUBRID drivers
Section titled “Migrating from the CUBRID drivers”The previous drivers (PHP and PDO extensions, Python, Perl, Ruby, ODBC, OLE DB and the old ADO.NET provider) were wrappers around the CCI C library. They are replaced by the drivers above:
- PHP: the
coradb_*functions of coradb-php mirror the oldcubrid_*extension functions; renamecubrid_tocoradb_andCUBRID_toCORADB_. The PDO driver is not continued; use the coradb-phpConnectionAPI. - Python: pycoradb is a port of pycubrid with the same DB-API 2.0 interface.
- ADO.NET: CoraDB.Data keeps the classes of the CUBRID ADO.NET provider, renamed
CoraDB*, in 100% managed code. - Node.js: node-coradb replaces node-cubrid; see the migration notes.
- Perl, Ruby, ODBC and OLE DB are no longer supported.