DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

Cubrid


CUBRID is an open-source object-relational OLTP database management system under GPL/BSD license, developed and owned by NHN Corporation. It is optimized for web services with its multi-threaded, multi-server architecture, native borker middleware, Multiversion Concurrency Control, cost-based query optimizer and High Availability feature.[05][02]

Source Code
https://github.com/CUBRID/cubrid[02]
Developer
Country of Origin
KR
Start Year
2008 [06]
Project Type
Open Source
Written in
C
Supported Languages
C, Java, JavaScript, Perl, PHP, Python, Ruby
Compatible With
MySQL
Operating Systems
Linux, Windows
Licenses
BSD License, GPL v2

Database Entry

Cubrid


CUBRID is an open-source object-relational OLTP database management system under GPL/BSD license, developed and owned by NHN Corporation. It is optimized for web services with its multi-threaded, multi-server architecture, native borker middleware, Multiversion Concurrency Control, cost-based query optimizer and High Availability feature.[05][02]

History[06][07][08]


In 2005, CUBRID project was launched in South Korea, motivated by NHN's need to support its over 10,000 servers around the world, while third-party solutions incurred high license cost and development difficulties. In 2008, CUBRID launches its first stable release (v1.0, later renamed as 8.1.1) and became an open source project.

Checkpoints[09]


CUBRID checkpoint can be triggered by two conditions: periodically when a fixed time interval is up, or when the log page size has exceeded a certain value. Thresholds for both triggers can be configured.

Concurrency Control[10][11]


Since v10.0, CUBRID moved from two phase locking protocol to a Multiversion Concurrency Control (MVCC) protocol. Under MVCC, readers are not blocked from accessing data currently being modified by other transactions. This support for non-blocking reads is ideal for read intensive applications. Additionally, MVCC also allows point-in-time consistent view and true snapshot isolation. CUBRID resolves deadlocks via deadlock detection.

Data Model[05][12][13]


CUBRID is an object-relational database management system, that is, it is essentially similar to a relational database, but with an object oriented model. In terms of the object-relational features provided, CUBRID supports collection data types such as set, multiset and list, which allows columns to store multiple values of the same data type. Columns can also be of custom data types defined via classees, which supports class inheritance and multiple inheritances. Additionally, CUBRID tables can also be viewed as classes, and can inherit other tables.

Foreign Keys[14]


CUBRID supports foreign key constraint, i.e. a set of columns that references the primary key in other tables. To maintain referential integrity, upon modification of the corresponding primary key, the foreign key can either be set to NULL or deleted. Foreign key constraint can also be set as such that its primary key is prevented from being modified at all, and any transaction attempting modification is rolled back.

Indexes[15][16]


CUBRID uses B-trees for indexes files. It supports indexes and unique indexes, and two types of special indexes called filtered index and function-based index. Filtered index is 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 operates based on a combination of values using a specific function.

Isolation Levels[10][17]


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 committed is the default.

Joins[18]


CUBRID query optimizer selects the join algorithm for a candidate query. Three join algorithms options are sort merge join, nested loop join and index nested loop join. To view the join algorithm used for current query, user can set the optimization level such as optimization is turned on and query plan gets outputted.

Logging[19]


CUBRID implements both physical logging and logical logging, and is under Write Ahead Logging protolcol. It also supports group commit and asynchronous commit. Additionally, recovery process is using REDO/UNDO recovery protocol.

Query Compilation[20][19]


CUBRID does not support query compilation.

Query Execution[19][02]


CUBRID is an OLTP database system that uses materialized query processing model. After query parsing, CUBRID generates a query plan as a XASL (Extended Accesss Specification Language) tree, where each XASL node represents an operator that scans its data, evaluates it against predicates and outputs a result.

Query Interface[21][22][23][24][25][26]


CUBRID complies with SQL-92 standard and supports extended SQL syntaxes. CUBRID provides a GUI-based CUBRID Manager called CUBRID Manager, and a console-based CSQL Interpreter. It also offers APIs in various languages with corresponding driver, including JDBC Driver, CCI (C-based application) Driver, PHP/PDO (PHO Data objects) Driver, ODBC Driver, OLE DB (Object Linking and Embedding Database) Driver, ADO.NET Driver, Perl Driver, Python Driver, Ruby Driver and Node.js Driver.

Storage Architecture[27][28]


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 database volume size and log volume size.

Storage Model[19][29]


As an object-relational, OLTP database, CUBRID uses N-ary storage model, and follows slotted page layout scheme. Large object which does not fit in a single page is placed in overflow pages.

Storage Organization[19]


CUBRID utilizes Heap File Organization. Upon insertion, objects are associated with an unique Object Identifier (OID) and placed in a heap.

Stored Procedures[30]


CUBRID supports stored functions and procedures in Java to enable complicated logic infeasiable otherwise through SQL.

System Architecture[31][32]


CUBRID has a 3-tier architecture, consisting of the database server in a multi-threaded client/server architecture, the broker middleware which replays the communication between the database server and external applications, and its API endpoints. Additionally, CUBRID can also be in standalone mode, where client and server processes are combined into one.

CUBRID offers High Availability (HA) feature, which synchronizes data among multiple servers to provide uninterrupted services when a software, hardware or network failure occurs in one of them. An HA group consists of master nodes as active servers, slave nodes as standby servers providing read services only, and replica nodes. When the master fails, replica node will no failover and the slave node with the highest priority becomes the new master. CUBRID HA is in shared-nothing architecture.

Views[33]


CUBRID supports creation of views via statement CREATE VIEW. The virtual tables does not exist physically, but can be updatable if the FROM clause only includes updateable table or view, and do not contain any of the following statement: DISTINCT, UNIQUE, GROUP BY, or any aggregation function. Additionally, columns containing path expressions or numeric columns with arithmetic operators cannot be updated even if the above criteria are met.

Citations

33 sources
  1. CUBRID | Enterprise Open Source DBMS cubrid.org
  2. GitHub - CUBRID/cubrid: CUBRID is a comprehensive open source relational database management system highly optimized for Web Applications. · GitHub github.com
  3. CUBRID Foundation: Manuals cubrid.org
  4. CUBRID - Wikipedia wikipedia.org
  5. Introduction to CUBRID | CUBRID 10.1 User Manual cubrid.org
  6. Meet CUBRID: One of Korea’s Top Open Source Projects | Alolita Sharma technetra.com
  7. https://db-engines.com/en/ranking/relational+dbms db-engines.com Dead — Check Archive
  8. Growing in the Wild. The story by CUBRID Database Developers. | PPTX slideshare.net
  9. System Parameters | CUBRID 10.1 User Manual cubrid.org
  10. System Parameters | CUBRID 10.1 User Manual cubrid.org
  11. Database Transaction | CUBRID 10.1 User Manual cubrid.org
  12. Class Inheritance | CUBRID 10.1 User Manual cubrid.org
  13. Data Types | CUBRID 10.1 User Manual cubrid.org
  14. TABLE DEFINITION STATEMENTS | CUBRID 10.1 User Manual cubrid.org
  15. Updating Statistics | CUBRID 10.1 User Manual cubrid.org
  16. INDEX DEFINITION STATEMENTS | CUBRID 10.1 User Manual cubrid.org
  17. Database Transaction | CUBRID 10.1 User Manual cubrid.org
  18. Updating Statistics | CUBRID 10.1 User Manual cubrid.org
  19. CUBRID Inside - Architecture, Source & Management Components | PPTX slideshare.net
  20. Introduction to CUBRID | CUBRID 10.1 User Manual cubrid.org
  21. https://www.cubrid.org/about/major-rdbms-features cubrid.org Dead — Check Archive
  22. API Reference | CUBRID 10.1 User Manual cubrid.org
  23. CSQL Interpreter | CUBRID 10.1 User Manual cubrid.org
  24. CUBRID SQL | CUBRID 10.1 User Manual cubrid.org
  25. Query Tools | CUBRID 10.1 User Manual cubrid.org
  26. Query Tools | CUBRID 10.1 User Manual cubrid.org
  27. System Parameters | CUBRID 10.1 User Manual cubrid.org
  28. https://www.slideshare.net/cubrid/cubrid-inside-architecture-source-management-component slideshare.net Dead — Check Archive
  29. DZone: Programming & DevOps news, tutorials & tools dzone.com Dead — Check Archive
  30. Java Stored Function/Procedure | CUBRID 10.1 User Manual cubrid.org
  31. Introduction to CUBRID | CUBRID 10.1 User Manual cubrid.org
  32. CUBRID HA | CUBRID 10.1 User Manual cubrid.org
  33. VIEW DEFINITION STATEMENTS | CUBRID 10.1 User Manual cubrid.org
Revision #8 Last Updated: