Cubid
Recently, in the field of databases, attention has been focused on intensively developing NoSQL solutions. There is a misleading impression that there is a lull in the relational DBMS sector: the main products have long been known, all the niches are occupied. It would seem that a new player is not so easy to get here. Only if it is not a project with a fifteen-year history, not a developed open-source object-relational DBMS optimized for use in web applications, not a system that has support for stored procedures, partitioning, high availability options, replication and distributed transactions . The name of this “dark horse” is CUBRID. And, judging by the statements of the creators, it claims to MySQL laurels.The horse was "hidden" in South Korea, where it gained popularity and began to be used in projects of government agencies and giants such as the NHN corporation. At the end of 2008, source codes were opened, but the project found an international face (with the launch of the official website and publication on sourceforge) only at the end of 2009.
Only the scope is related to MySQL with MySQL, they do not have a common code base and differ in the approaches used since ideas and ending with an API. High performance for web applications is embedded in the three-tier CUBRID architecture.
- The server subsystem is presented as a set of processes, each of which solves a narrow set of tasks:
- free space allocation
- logging
- lock management
- transaction management
- processing objects and requests
- The client subsystem includes APIs for C, PHP, Python and Ruby, as well as support for JDBC, ODBC and OLEDB, and takes care of
- parsing and query optimization
- object and lock caching
- management of objects, transactions and triggers
- The intermediate subsystem (Broker) implements
- task queue
- connection pool
- monitoring
- logging

The CUBRID architecture is focused on scaling links of brokers that take on the tasks of query optimization and connection pooling, unloading the database server, and also increase system security by isolating request processing. In addition, a project to cluster the database itself was launched on June 7, 2010 (a stable version is planned for release by the end of the year).
Also, this DBMS has a number of unique features that are relevant specifically for web applications. I will give an example. Imagine that your database is used to store a large number of articles. There are users who view them. Consider the generally accepted sequence of actions when requesting an article to view:
SELECT header, text FROM articles WHERE article_id = :requested_id;
UPDATE articles SET read_count = read_count + 1 WHERE article_id = :requested_id;Now remember what happens under high load. True, blocking due to updates will significantly reduce performance. In CUBRID, this problem is solved as follows:
SELECT header, text, INCR(read_count) FROM articles WHERE article_id = :requested_id;A lock is not created. Another original extension is the DO directive, which tells the database not to return any query results, whether it is function output, selection, or an error message. As a confirmation of the effectiveness of these solutions, the site contains the results of performance testing. Despite the fact that the names of competitors are hidden, you can easily guess who is who.
The DBMS is written in C and C ++, the administration interface is in Java, Linux and Windows are supported. Already implemented support for SQL-92, JDBC, ODBC and OLEDB.
CUBRID uses an object-relational approach to data storage. Therefore, there are no columns in it - there are attributes, there are no tables - there are classes, there are no rows - there are instances of classes, there are no data types - there are domains, there are no procedures - there are methods. This allows instead of generating DDL for the existing class structure, just take the compiled jar-file, load it into the database:
loadjava db_name MyClass.classand publish functionscsql> create function Sample() return string as language java name 'MyClass.Sample() return java.lang.String';
csql> ;xrunProfit! And so, when using the object approach, the attributes change:
CUBRIDResultSet rs = (CUBRIDResultSet) stmt.executeQuery("select object_name from object_name");
rs.next();
CUBRIDOID oid = rs.getOID(1);
oid.addToSet("set_name", new Integer(10));
oid.addToSequence("list_name", 1, new Integer(30));
oid.putIntoSequence("list_name", 99, new Integer(99));
oid.removeFromSet("set_name", new Integer(1));
oid.removeFromSequence("list_name", 1);
con.commit();
rs.close();For Java developers, there is support for Eclipse via QuantumDB and a driver for Hibernate, although, after the examples above, it is hardly useful.
In addition to all these differences, CUBRID has good administration tools, good implementation of high availability (failover, updating the DBMS and OS without downtime), and backup (hot backups, compression). Ready and tools for migration: Scriptella and Apache DdlUtils. MediaWiki, phpBB, Wordpress and several smaller projects can already use CUBRID as storage.
The disadvantages include: for now, a small community of developers and users, the lack of support for Solaris, Mac OS X and FreeBSD, as well as some features of the SQL dialect, although the documentation and video tutorials remove almost all the questions.
It is surprising that there is practically no information on this topic in Runet, except for a couple of mentions in the Ruby community and translation of an English-language article on Wikipedia, where it was mistakenly ( proof ) that the database has been developed since 2006. I think this review will provide readers with food for thought.