CUBRID
Developer(s)NHN Search Solutions
Initial releaseNovember 20, 2008 (2008-11-20)
Stable release
CUBRID 8.4.3 / 20 November 2012; 11 years ago (2012-11-20)[1]
Preview release
CUBRID 9.0 beta / 12 October 2012; 12 years ago (2012-10-12)[2]
Written inC
Operating systemLinux, Windows
Available inEnglish
TypeRDBMS
LicenseGNU General Public License for Server Engine and BSD license for APIs and GUI tools
Websitewww.cubrid.org

CUBRID (/ˈkjuːbrɪd/ "cube-rid") is an open source SQL based relational database management system (RDBMS) with object extensions[3] developed by NHN Corporation for web applications[4]. The name CUBRID is a combination of the two words cube and bridge, cube standing for a sealed box that provides security for it's contents while bridge standing for data bridge.[citation needed]

License policy

edit

CUBRID has a separate license for its server engine and its interfaces. The server engine adopts the GPL v2.0 or later license, which allows distribution, modification, and acquisition of the source code. CUBRID APIs and GUI tools have the Berkeley Software Distribution license in which there is no obligation of opening derivative works. The reason of adopting two separate license systems is to provide complete freedom to Independent software vendors (ISV) to develop and distribute CUBRID based applications.[5]

Architecture

edit

The feature that distinguishes CUBRID Database from other relational database systems is its 3-tier client-server architecture[6] which consists of the database server, the connection broker[7] and the application layer.

Database server

edit

The database server is the component of the CUBRID database management system which is responsible for storage operations and statement execution. A CUBRID database server instance can mount and use a single database, making inter-database queries impossible. However, more than one instance can run on a machine.

Unlike other solutions, the database server does not compile queries itself, but executes queries precompiled in a custom access specification language.[citation needed]

Connection broker

edit

The CUBRID connection broker's main roles are:

  • management of client application connections
  • caching and relaying information (e.g. query results)
  • query syntax analysis, optimization and execution plan generation

Also, a local object pool enables some parts of the execution to be deferred from the database server (e.g. tuple insertion and deletion, DDL statements), thus lowering the database server load.

Since the connection broker is not bound to the same machine as the database server, CUBRID can take advantage of the hardware resources of several machines while processing queries on a single database.

Application layer

edit

Applications can use one of the avaliable APIs to connect to a CUBRID connection broker.

Features

edit

High Availability

edit

CUBRID High Availability[8] provides load-balanced, fault-tolerant and continuous service availability through its shared-nothing clustering, fail-over and fail-back automated mechanisms.

CUBRID's 3-tier architecture allows native support for High-Availability with two-level auto failover: the broker failover and server failover.

Broker failover

edit

When connecting to a broker via a client API, users can specify, in the connection URL, a list of alternative hosts where brokers are listening for incoming requests. In case of a hardware, network, operating system or software failure on one of the hosts, the underlying client API automatically fails over to the next host that a user has provided.

Server failover

edit

The High Avaliability environment can be built with 1:N master-slave server nodes. Each slave node communicates with the master via CUBRID Heartbeat protocol. When a master node is unresponsive, the first of the slave nodes will get promoted to a master role. Replication between nodes can be achieved in one of three modes: synchronous, semi-synchronous, and asynchronous.

Administrators can specify a list of server hosts each broker can connect to and, in the event of a failure of the master node, another will be used.

Scalability and maintainability

edit

Database sharding

edit

CUBRID provides built-in support for database sharding. The sharding interface is implemented by a special broker called CUBRID SHARD. Communicating with CUBRID SHARD is identical to communicating with a normal broker so the same client APIs can be used. All features of the normal broker such as failover and load balancing also apply to CUBRID SHARD.

The storage is implemented as separate independent physical databases located on separate CUBRID server hosts. Each shard can be fully configured into High Availability environment.

The data distribution logic among shards lies in CUBRID SHARD, which determines which shard to use for storage or retrievel of data based on a hash or user defined algorithm.[9]

Backup

edit

CUBRID supports online, offline and incremental backup.[10]

Performance

edit

API level load balancing

edit

Because a connection broker can be configured in four different modes (read-write, read-only, slave-only, preferred host read only), the list of alternative hosts which a user has provided via the connection URL can be used as a method to balance the load. When Load Balancing is used, the client API will randomly choose a host among those specified in the connection URL except the one which was used to connect to last time. If the chosen host is not available, the selection will continue until all the hosts are determined as unavailable. In such case, the driver will report an error.[11]

Query plan caching

edit

A query execution plan cache is implemented on the broker in order to skip most of the compilation steps on often used queries. Because the queries are parametrized during parsing, two queries that differ only by the values of literal constants share the same cache entry.[12]

Storage

edit

Indexes

edit

CUBRID has support for B+-tree indexes, both single-column and multi-column. The following types of indexes can be created:

  • Indexes and reversed indexes[13]
  • Unique indexes and reverse unique indexes
  • Function based indexes[14]
  • Filtered indexes[15]

The query optimizer can use indexes to produce faster execution plans using methods such as:

Table partitioning

edit

CUBRID supports horizontal partitioning by range, hash and value lists, with a maximum of 1024 partitions per table.[20] Partitions can be accessed independently and support most operations that are valid on a normal table.

As of version 9.0, CUBRID implements execution-time partition pruning.[21]

SQL support

edit

CUBRID implements a large subset of the ANSI SQL:1999 standard, extended with features from later SQL standards and custom features.[citation needed]

Window Functions

edit

CUBRID provides support for window functions as defined in the SQL:2003 standard. The implemented functions are ROW_NUMBER, COUNT, MIN, MAX, SUM, AVG, STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP, RANK, DENSE_RANK, LEAD, LAG and NTILE.[22]

Hierarchical queries

edit

Hierarchical queries using the non-standard START WITH ... CONNECTY BY Oracle syntax are supported in CUBRID. A number of specialized pseudocolumns and operators are provided for controlling the behavior of the query execution.[23]

Built in click-counter

edit

CUBRID optimizes the common scenario in web applications where database fields need to be incremented on certain events (e.g. page views). In contrast to the usual approach of using a SELECT/UPDATE statement combination, CUBRID can increment fields from within the SELECT statement execution, bypassing some expensive compiling, execution and locking overhead associated with an UPDATE statement.[24]

Java stored procedures

edit

The only stored procedure language supported in CUBRID is Java, requiring a Java virtual machine to be installed on the system.[25] The virtual machine is started and managed by the server and is used for code execution.

Stored procedure code that requires database access must use the JDBC driver, either using the parent transaction or issuing a new one.[26]

Regular expression

edit

In addition to the LIKE operator, CUBRID provides the REGEXP operator for regular expression pattern matching. By default, the operator does a case insensitive matching on the input string, but the modifier BINARY can be used for case sensitive scenarios. An optional alias of REGEXP is RLIKE.[27]

Currently, CUBRID does not support REGEXP on Unicode strings.[citation needed]

Data types

edit

A variery of data types are supported by CUBRID:[28]

  • For numeric values:
  • For string values:
    • fixed-length character and bit strings: CHAR, BIT
    • variable-length character and bit strings: CHAR VARYING, BIT VARYING
  • For date and time values:
    • date values: DATE
    • time values: TIME
    • date and time values: DATETIME, TIMESTAMP (internally stored as a Unix timestamp)
  • For collections: SET, MULTISET, LIST
  • User defined enumerations: ENUM
  • For large objects: BLOB, CLOB

Supported platforms

edit

CUBRID is avaliable for Microsoft Windows and Linux (most distributions), for 32 bit and 64 bit architectures. Partial support for OS X is implemented.

Interfaces

edit

Command line

edit

CUBRID comes with a built-in command line interface named csql that can be used to execute SQL statements on the CUBRID server.[29] The tool can be used in one of two modes:

  • CS (client/server) mode, which can connect to local or remote CUBRID servers
  • SA (stand alone) mode, used mainly for administration purposes, which mounts a local database by emulating a server instance

CUBRID's csql also implements some internal commands related to schema information, plan generation, debugging, transaction control, query timing and more.

Programming

edit

CUBRID provides a number of language-specific application programming interfaces[30]: C driver (also called CCI, CUBRID's native driver), JDBC, PHP/PDO driver, ODBC, OLEDB, ADO.NET, Ruby driver, Python driver, Node.js driver, and Perl driver.

Graphical

edit

Several graphical user interface tools have been developed for CUBRID:

  • CUBRID Manager[31] is a database administration tool for CUBRID distributed under the BSD license
  • CUBRID Query Browser is a lightweight version of the CUBRID Manager
  • CUBRID Web Manager[32] is a web based version of the CUBRID Manager that can be deployed on remote servers
  • CUBRID Migration Toolkit[33] is a tool which allows data migration from MySQL and previous versions of CUBRID databases to the latest CUBRID database server

Release history

edit
Version Release date Beta release date Additions
9.0 October, 2012 Internationalization support, function index, filter index, index skip scan, MERGE statement, window functions.[34]
8.4.3 November 20, 2012 Database sharding, API level load balancing, built-in web manager with monitoring support[35]
8.4.1 February 24, 2012 February 1, 2012 Important performance optimizations, SQL extensions, REGEXP operator.[36]
8.4.0 July 1, 2011 May 12, 2011 High Avaliability improvements, CUBRID C API improvements, notable performance optimizations, covering index[37][38]
3.1 December 31, 2010 November 12, 2010 BLOB and CLOB support, High Avaliability monitoring support, drivers (JDBC, ODBC and CUBRID C API) improvements[39]
3.0 October 4, 2010 July 19, 2010 SQL extensions, High Avaliability improvements[40][41]
2.2 April 30, 2010 High Avaliability improvements, CUBRID C API improvements, some performance improvements[42]
2.1 December, 2009
2.0 August, 2009
1.4 March, 2009
1.3 February, 2009
1.2 January, 2009
1.1 November, 2008 CUBRID became an open source project
1.0 October, 2008 First stable release

Applications

edit

Some applications and websites that have added CUBRID support or are powered by CUBRID:

See also

edit

References

edit
  1. ^ "CUBRID 8.4.3 with Database Sharding". CUBRID 8.4.3. 20 November 2012. Retrieved 20 November 2012.
  2. ^ "CUBRID 9.0 Faster and More Performant". CUBRID 9.0 Blog. 12 October 2012. Retrieved 10 October 2012.
  3. ^ "How data is stored in CUBRID RDBMS? Intro to Objects, Classes, OID and Inheritance". CUBRID Blog. 12 December 2012. Retrieved 8 February 2013.
  4. ^ "CUBRID Inside - Architecture, Source & Management Components". Slideshare. 24 August 2011. Retrieved 8 February 2013.
  5. ^ "CUBRID License". Retrieved 8 February 2013.
  6. ^ "The Client-Server Architecture and Execution Modes in CUBRID Database". CUBRID Blog. 22 January 2013. Retrieved 8 February 2013.
  7. ^ "The CUBRID Broker Story". CUBRID Blog. 21 January 2013. Retrieved 8 February 2013.
  8. ^ "CUBRID High Avaliability Overview". Retrieved 8 February 2013.
  9. ^ "Database Sharding the Right Way: Easy, Reliable, and Open source". Slideshare. 20 October 2012. Retrieved 8 February 2013.
  10. ^ "CUBRID Backup Strategy and Method". Retrieved 8 February 2013.
  11. ^ "CUBRID 8.4.3 with DB Sharding and API level Load Balancing is here". CUBRID Blog. 20 November 2012. Retrieved 8 February 2013.
  12. ^ "Shared Query Plan Caching in CUBRID". Retrieved 9 February 2013.
  13. ^ http://www.cubrid.org/?mid=manual90&entry=CREATE%20INDEX
  14. ^ http://www.cubrid.org/manual/90/en/Function-based%20Index
  15. ^ http://www.cubrid.org/manual/90/en/Filtered%20Index
  16. ^ http://www.cubrid.org/cubrid_covering_index
  17. ^ http://www.cubrid.org/manual/90/en/Index%20Scan%20in%20Descending%20Order
  18. ^ http://www.cubrid.org/manual/90/en/Optimizing%20ORDER%20BY%20Clause
  19. ^ http://www.cubrid.org/manual/90/en/Optimizing%20GROUP%20BY%20Clause Group by skip
  20. ^ http://www.cubrid.org/manual/831/en/What%20is%20Partitioning
  21. ^ "CUBRID 9.0 Manual - Partition Pruning". Retrieved 12 February 2013.
  22. ^ "CUBRID Manual - Aggregate/Analysis functions". Retrieved 11 February 2013.
  23. ^ "CUBRID Manual - Hierarchical Query". Retrieved 11 February 2013.
  24. ^ "CUBRID Manual - CUBRID Click Counter". Retrieved 11 February 2013.
  25. ^ "CUBRID Java Stored Procedures". Retrieved 11 February 2013.
  26. ^ "CUBRID Manual - Using Server-side Internal JDBC Driver". Retrieved 11 February 2013.
  27. ^ "CUBRID Manual - REGEXP/RLIKE Conditional Expressions". Retrieved 11 February 2013.
  28. ^ "CUBRID Manual - Data Types". Retrieved 11 February 2013.
  29. ^ "How to use CSQL utilities". Retrieved 8 February 2013.
  30. ^ "CUBRID APIs Wiki". Retrieved 8 February 2013.
  31. ^ "CUBRID Manager page". Retrieved 8 February 2013.
  32. ^ "CUBRID Web Manager page". Retrieved 8 February 2013.
  33. ^ "CUBRID Migration Toolkit page". Retrieved 8 February 2013.
  34. ^ "New CUBRID 9.0.0". CUBRID Official Blog. 2012-10-30. Retrieved 2012-11-08.
  35. ^ "CUBRID 8.4.3 with DB Sharding and API level Load Balancing is here". CUBRID Official Blog. 2012-11-20. Retrieved 2012-12-25.
  36. ^ "New CUBRID 8.4.1 is 70% faster". CUBRID Official Blog. 2012-02-01. Retrieved 2012-02-02.
  37. ^ "CUBRID 8.4.0 has arrived w/ x2 faster database engine!". CUBRID Official Blog. 2011-05-13. Retrieved 2011-05-17.
  38. ^ "CUBRID 8.4.0 GA is now available for download". CUBRID Official Blog. 2011-07-04. Retrieved 2011-07-14.
  39. ^ "CUBRID 3.1 Stable is now available!". CUBRID Official Blog. 2010-12-31. Retrieved 2011-01-03.
  40. ^ "CUBRID 3.0 Stable has arrived!". CUBRID Official Blog. 2010-10-04. Retrieved 2010-10-05.
  41. ^ "New CUBRID 2008 R3.0 Beta has been released". CUBRID Official Blog. 2010-07-20. Retrieved 2010-07-21.
  42. ^ "New Version Release - CUBRID 2008 R2.2". CUBRID Official Blog. Retrieved 2010-05-07.
  43. ^ "How to simulate MySQL INSERT statement extensions". Lukas Eder. 2012-05-15. Retrieved 2013-02-04.
  44. ^ "SOFA Statistics". sofastatistics.com. 2012-11-20. Retrieved 2010-11-17.
  45. ^ "SIDU Incredibly Simple Intuitive Web Based SQL Client". http://sidu.sourceforge.net. 2012-05-25. Retrieved 2013-02-04. {{cite web}}: External link in |publisher= (help)
  46. ^ "ART Simple Yet Effective Open Source Reporting Tool". art.sourceforge.net. 2012-06-10. Retrieved 2013-02-04.
  47. ^ "Package scriptella.driver.cubrid". Retrieved 11 February 2013.
  48. ^ "Run Your Own Whois Server With JWhoisServer". Klaus Zerwes. 2012-07-06. Retrieved 2013-02-04.
  49. ^ "RedBeanPHP Super Easy to Use PHP ORM". redbeanphp.com. 2012-07-08. Retrieved 2013-02-04.
edit


Category:Free database management systems Category:Cross-platform software Category:SQL