CUBRID is an open-source relational DBMS designed to optimize Internet data services.


The CUBRID project started in South Korea in 2006, with NHN (later split into Naver Corporation and NHN Entertainment in 2013) joined as a major co-developer. In October 2008, CUBRID became an open source project with a GPL v2 or later license. As of December 2018, CUBRID ranked as the 65nd most popular relational DBMS by DB-Engines.

Query Interface

Custom API SQL Stored Procedures Command-line / Shell

CUBRID supports a wide range of SQL syntaxs. It also provides APIs in various languages with corresponding driver, e.g. JDBC Driver, PHP Driver, CCI Driver (C-based application), Perl Driver, Python Driver, etc. Additionally, user can also interact with CUBRID via its GUI-based program called CUBRID Manager.


Virtual Views

CUBRID supports creation of views via statement `CREATE VIEW`. The virtual tables does not exist physically, but can be updatable if it satisfies some criteria.

Concurrency Control

Multi-version Concurrency Control (MVCC)

Since v10.0, CUBRID moved from two phase locking protocol (2PL) to a Multiversion Concurrency Control (MVCC) protocol. The gain is mostly non-blocking reads for read intensive applications, common in real-world scenarios. This also grants point-in-time consistent view of the database, and reduction of performance costs compared to other concurrency protocols.


Physical Logging

CUBRID allows user to configure the frequency of logging and the life span of log archives. For example, user can set the size of log buffer cached in memory via parameter `log_buffer_size`, and the maximum number of archive log files stored in disk via `log_max_archives`. Archiving runs in the background by default, and could be changed by setting `background_archiving` to `no`.


Nested Loop Join Sort-Merge Join Index Nested Loop Join

CUBRID allows user to set optimization levels and get current query plan. Specifically for join methods, it supports nested loop join, sort merge join (can be enabled by parameter `optimizer_enable_merge_join`, which defaults to `no`), and index nested loop join.

Storage Model


As an object-relational database, CUBRID stores records as objects with an unique Object Identifier (OID). Insertions, deletions and modifications of records on pages are managed by the Slotted Page Manager, and large object which does not fit in a single page is placed on overflow pages managed by the Overflow File Manager.

Isolation Levels

Snapshot Isolation

CUBRID supports true snapshot isolation under the Multiversion Concurrency Control (MVCC) protocol. CUBRID provides 3 isolation levels: Serializable, Repeatable read, and Read committed, where Read commited is the default.

Stored Procedures


CUBRID supports stored functions and procedures which enables complicated logic infeasiable otherwise through SQL. Specifically, the `java_stored_procedure` parameter needs to be set to `yes` in `cubrid.conf` (defaults to `no`), and compiled Java classes can be loaded into CUBRID via its `loadjava` utility, and published via `CREATE FUNCTION`.



CUBRID uses B-trees for indexes files. It supports the following types of indexes: - Indexes and unique indexes - Filtered index: used for sorting, searching and operating a well-defined partials set for a table. Only a subset of data that meet the condition is indexed. - Function-based index: used for sorting and searching rows based on a combination of values using a specific function.

Storage Architecture


CUBRID is a disk-oriented database, memory is used for caching purposes. User can configure several disk-related parameters for database volumes and files, such as `db_volume_size` (default value 512M), `log_volume_size ` (default value 512M), and `unfill_factor`, which defines the percentage of disk space allocated in a heap page for updates.



CUBRID allows user to configure checkpoint through two options: - `checkpoint_every_size`: configure checkpoint interval by log page, defaults to 100000 * `log_page_size`. Checkpoint will be periodically processed every time after the transaction log size reaches this value. - `checkpoint_interval`: configure checkpoint periodically by a fixed time interval. Defaults to 6 minutes. Additionally, CUBRID also allows user to set a slow data flush (from buffer to disk) by setting the parameter `checkpoint_sleep_msecs`.

Foreign Keys


CUBRID supports foreign key constraint, i.e. a set of columns that references the primary key in other tables. Users can also specify what action is triggered by update or delete of the primary key referenced. Options include: - `CASCADE`: deletes the foreign key is the primary key is deleted. - `SET NULL`: updates the value to `NULL` when the corresponding record is deleted or updated. - `RESTRICT`: prevents the corresponding foreign key being updated or deleted. Transactions that attempt these operations will be rolled back.

Data Model


CUBRID is an object-relational database management system, that is, it is essentially similar to relational database, but also provides an object oriented database elements relations.

System Architecture


CUBRID allows one master process for each host. It offers CUBRID High Availability (HA) which supports uninterrupted services under a hardware, software or network failure. It ensures database synchronization among multiple servers, and is implemented under shared-nothing architecture. Synchronization between an active server and a standby server is achieved through transaction log multiplexing and reflection.

Query Compilation

Not Supported Code Generation

CUBRID in general does not support query compilation. However, its PHP API (and PHP API only) provides a method `cubrid_prepare` which pre-compiles the SQL statement accepted, which can be used for re-executing the statement or effectively processing Long Data.

Storage Organization


Cubrid Logo

Source Code

Tech Docs


Naver Corporation

Country of Origin


Start Year


Project Type

Commercial, Open Source

Written in


Supported languages

C, Java, JavaScript, Perl, PHP, Python, Ruby

Compatible With


Operating Systems

Linux, Windows