<?xml version="1.0" encoding="UTF-8" ?><feed xmlns="http://www.w3.org/2005/Atom">
	<title type="text">CUBRID | Enterprise Open Source DBMS</title>
		<updated>2026-04-09T22:44:24+00:00</updated>
	<id>https://www.cubrid.org/index.php?module=rss&amp;act=atom</id>
	<link rel="alternate" type="text/html" hreflang="en" href="https://www.cubrid.org/"/>
	<link rel="self" type="application/atom+xml" href="https://www.cubrid.org/index.php?module=rss&amp;act=atom"/>
	<generator uri="http://www.xpressengine.com/">XpressEngine</generator>
   <entry>
		<title><![CDATA[Getting Started With DBeaver for CUBRID]]></title>
		<id>https://www.cubrid.org/3828101</id>
		<published>2022-07-13T14:05:25+00:00</published>
		<updated>2022-07-13T14:09:35+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3828101"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3828101#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Written by&nbsp;<strong>Thim Thorn</strong> at Phnom Voar Software, Cambodia</span></span></p>

<p>&nbsp;</p>

<hr />
<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Introduction</strong><b>&nbsp;</b></span></span></h1>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">DBeaver is a free multi-platform database tool for developers, database administrators, analysts and all people who need to work with databases. It supports all popular databases: MySQL, PostgreSQL, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Apache Hive, Phoenix, Presto, etc. DBeaver is running on Windows, Mac OS X and Linux. This document summarizes how to get started with DBeaver for CUBRID for Windows users.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Installing DBeaver on a Windows</strong></span></span><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:26px;"><strong>&nbsp;</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">To install DBeaver, open a web browser and go to dbeaver.io/download/. Click Windows (Installer) under Community Edition.</span></span></p>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/ppboeko9kx691.png?width=436&amp;format=png&amp;auto=webp&amp;s=2d895e69f2b95723a3d8ff848aed39f9486c4b1e" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/ppboeko9kx691.png?width=436&amp;format=png&amp;auto=webp&amp;s=2d895e69f2b95723a3d8ff848aed39f9486c4b1e" /></a></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Follow the instructions on the installation screen. At &ldquo;Choose Components,&rdquo; if you already have a Java installed on your machine and you want to use it, uncheck &ldquo;Include Java.&rdquo;</span></span></p>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/ex6gsmogkx691.png?width=313&amp;format=png&amp;auto=webp&amp;s=199807bc6d389d804dfde4d533843689c3f6125b" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/ex6gsmogkx691.png?width=313&amp;format=png&amp;auto=webp&amp;s=199807bc6d389d804dfde4d533843689c3f6125b" /></a></p>

<p>&nbsp;</p>

<hr />
<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Start DBeaver and connect to databases</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">After starting DBeaver, go to &ldquo;New databases connection&rdquo; and select CUBRID.</span></span></p>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/3wrmoyvikx691.png?width=343&amp;format=png&amp;auto=webp&amp;s=289293932fdedfb4a687e71b621e54e7d656192e" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/3wrmoyvikx691.png?width=343&amp;format=png&amp;auto=webp&amp;s=289293932fdedfb4a687e71b621e54e7d656192e" /></a></p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">You will need to provide CUBRID-specific connection settings as follows:</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">The connection setting displayed, fill the box on CUBRID connection setting (the information secures provided by CUBRID)</span></span></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">JDBC URL: URL for CUBRID JDBC driver. It is automatically populated.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Host: IP of server on which CUBRID server is running</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Port: A TCP port for CUBRID, by default, 33000.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Database/Schema: A database name. We will use &lsquo;demodb&rsquo; for this tutorial.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Username: A user name. We will use &lsquo;dba&rsquo; for this tutorial.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Password: The password of the user. We will leave the password blank in this tutorial.</span></span></p>
	</li>
</ul>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/wc2jd4ykkx691.png?width=474&amp;format=png&amp;auto=webp&amp;s=29244926a0ec2a167b19df200a76ee05e06c5c3d" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/wc2jd4ykkx691.png?width=474&amp;format=png&amp;auto=webp&amp;s=29244926a0ec2a167b19df200a76ee05e06c5c3d" /></a></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Click &ldquo;Test Connection&rdquo; to make sure the connection is successful, and then click &ldquo;Finish.&quot;</span></span></p>

<p>&nbsp;</p>

<hr />
<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Explore Databases</strong><strong>&nbsp;</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">You can view the content of a table in the Database Navigator. Select the table that you want to see and select &ldquo;View Data.&rdquo;</span></span></p>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/scxj9gcnkx691.png?width=419&amp;format=png&amp;auto=webp&amp;s=6328ace669022f00d4d29654005b2ea8c13f697a" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/scxj9gcnkx691.png?width=419&amp;format=png&amp;auto=webp&amp;s=6328ace669022f00d4d29654005b2ea8c13f697a" /></a></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Another very useful and cool feature is to see the relationship between the tables. Select the table from which you want to see the relationships and select &ldquo;View Diagram.&rdquo; It will show an ER diagram of the table and its relationship.</span></span></p>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/cvddwtfpkx691.png?width=371&amp;format=png&amp;auto=webp&amp;s=ac6289192294d49317c05e4670a4e356a1857da0" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/cvddwtfpkx691.png?width=371&amp;format=png&amp;auto=webp&amp;s=ac6289192294d49317c05e4670a4e356a1857da0" /></a></p>

<p>&nbsp;</p>

<hr />
<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Run SQL queries</strong></span></span><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:26px;"><strong>&nbsp;</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">You can run SQL queries against the CUBRID server using DBeaver for CUBRID. Here are a few examples you can try with the &lsquo;demodb&rsquo; database.&nbsp;</span></span><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">For instance, the following SQL would return the number of countries that participated in the Olympic games each year:</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<pre class="brush:sql;gutter:false"  title="">select host_year, count(nation_code)
from participant
group by host_year
order by host_year desc;</pre>

<p>&nbsp;</p>

<p><a href="https://preview.redd.it/q3duczhrkx691.png?width=367&amp;format=png&amp;auto=webp&amp;s=6b5509e251a78a701e9c2a7a7c170aac3e266632" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/q3duczhrkx691.png?width=367&amp;format=png&amp;auto=webp&amp;s=6b5509e251a78a701e9c2a7a7c170aac3e266632" /></a></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">At the Olympic games, athletes represent their country and they compete with each other to get gold medals. The following SQL would return the number of gold medals each country won in 2004 in the order of the number of medals:</span></span></p>

<pre class="brush:sql;gutter:false"  title="">select participant.host_year, nation.name, participant.gold
from participant, nation
where participant.host_year = 2004
and participant.gold &gt; 0
and participant.nation_code = nation.code
order by participant.gold desc;</pre>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><img alt="r/CUBRID - Getting Started With DBeaver for CUBRID" src="https://preview.redd.it/5n193uitkx691.png?width=472&amp;format=png&amp;auto=webp&amp;s=c0eaaeb0258ce1eaa7035f0f71be76c4ed7bd4cb" /></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[Getting Started with Cubrid Migration Toolkit Console Mode]]></title>
		<id>https://www.cubrid.org/3828092</id>
		<published>2022-07-13T13:51:04+00:00</published>
		<updated>2022-07-13T13:53:02+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3828092"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3828092#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by&nbsp;<strong>Rathana Va</strong> at Phnom Voar Software, Cambodia</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1 style="text-align: justify;"><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Introduction</strong></span></span><span style="font-family:verdana,geneva,sans-serif;"><b>&nbsp;</b></span></h1>

<p style="text-align: justify;"><span style="font-size:16px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID Migration Toolkit (CMT) Console is a tool to migrate the data and the schema from the source DB (MySQL, Oracle, CUBRID, etc) to the target DB (CUBRID). CMT Console mode is a separate product from the CMT GUI version. It could be useful for some cases like automating migration or linux command line mode.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1 style="text-align: justify;"><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Installation&nbsp;</strong></span></span></h1>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Windows</span></span></p>
	</li>
</ul>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">1. Download through the link:&nbsp;<a href="http://ftp.cubrid.org/CUBRID_Tools/CUBRID_Migration_Toolkit/CUBRID-Migration-Toolkit-11.0-latest-windows-x64.zip" rel="noopener nofollow ugc" target="_blank">http://ftp.cubrid.org/CUBRID_Tools/CUBRID_Migration_Toolkit/CUBRID-Migration-Toolkit-11.0-latest-windows-x64.zip</a></span></span></p>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">2. Extract the Zip file</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">​</span></span></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Linux</span></span></p>
	</li>
</ul>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">1. Download through the link using web browser or wget command:&nbsp;<a href="http://ftp.cubrid.org/CUBRID_Tools/CUBRID_Migration_Toolkit/CUBRID-Migration-Toolkit-11.0-latest-linux-x86_64.tar.gz" rel="noopener nofollow ugc" target="_blank">http://ftp.cubrid.org/CUBRID_Tools/CUBRID_Migration_Toolkit/CUBRID-Migration-Toolkit-11.0-latest-linux-x86_64.tar.gz</a></span></span></p>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">2. Extract the tar.gz file</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">​</span></span></p>

<pre class="brush:plain;gutter:false"  title="">tar -xf CUBRID-Migration-Toolkit-11.0-latest-linux-x86_64.tar.gz</pre>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1 style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:26px;">Using CMT Console</span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Build Migration Script</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">It is a feature for exporting the xml script which is used for migrating databases. CMT GUI versions also support this feature.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><strong><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Command Template</span></span></strong></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Windows:</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">migration.bat script -s &lt;source_configuration&gt; -t &lt;target _configuration&gt; -o &lt;script_file&gt; </pre>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Linux:</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">sh migration.sh script -s &lt;source_configuration&gt;  -t &lt;target _configuration&gt; -o &lt;script_file&gt; </pre>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><em><strong>source_configuratio</strong></em><strong>n</strong>: It is a configuration name of database source connection.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><em><strong>target_configuration</strong></em>: It is a configuration name of data target connection</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><em><strong>script_file</strong></em>: It is the xml script file name which is going to save after successfully generated.</span></span></p>
	</li>
</ul>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Open db.conf file which is located inside the CMT console folder, then modify configuration for your database connection. db.conf has prefix configuration names like: db2, db3, db4, mt, demodb. It is just a configuration name when set in command, you can add new or change as for your convenience.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Parameters:</strong></span></span></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>type</strong>: It is a type of database: like MySQL, cubrid &hellip;etc.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>driver</strong>: driver file which located in jdbc folder corresponded to type of database, better just leave as default from original db.conf</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>host</strong>: IP address of server which database has installed</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>port</strong>: Port of database running, for example curbrid running on port 33000 as default.</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>dbname</strong>: name of database schema</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>user</strong>: username of database</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>password</strong>: password of user</span></span></p>
	</li>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>charset</strong>: utf-8</span></span></p>
	</li>
</ul>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this example, let pick up&nbsp;<em>mt</em>&nbsp;as source and&nbsp;<em>demodb</em>&nbsp;as target.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Now replace variable in command line to real value.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><strong><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Command Usage</span></span></strong></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Open terminal or cmd and navigate to the CMT Console folder which you have extracted.</span></span></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Windows</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">migration.bat script -s mt -t demodb -o script.xml </pre>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Linux</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">sh migration.sh script -s mt -t demodb -o script.xml </pre>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">After successfully executing, it will generate a script.xml file in the CMT console folder.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Migration Database</span></span></strong></p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">It is a feature for migrating databases by using xml script.</span></span></p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Window</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">migration.bat start script.xml</pre>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Linux</span></span></p>
	</li>
</ul>

<pre class="brush:xml;gutter:false"  title="">sh migration.sh start script.xml</pre>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">After finishing, it shows the results like this.</span></span></p>

<p style="text-align: justify;"><a href="https://preview.redd.it/r17fjftwt2791.png?width=841&amp;format=png&amp;auto=webp&amp;s=e820524080e269727566ab25cf1aa01fc9bb788b" rel="noopener noreferrer" target="_blank"><img alt="r/CUBRID - Getting Started with Cubrid Migration Toolkit Console Mode" src="https://preview.redd.it/r17fjftwt2791.png?width=841&amp;format=png&amp;auto=webp&amp;s=e820524080e269727566ab25cf1aa01fc9bb788b" /></a></p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Finally, we can migrate databases successfully. It will generate a report which is located in the&nbsp;<em><strong>workspace/cmt/report</strong></em>&nbsp;and can be viewed in CMT GUI version.</span></span></p>

<h1 style="text-align: justify;">&nbsp;</h1></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID INSIDE: Subquery and Query Rewriter (View Merging, Subquery Unnest)]]></title>
		<id>https://www.cubrid.org/3828064</id>
		<published>2022-07-08T18:34:33+00:00</published>
		<updated>2022-07-08T18:34:32+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3828064"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3828064#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align:right;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by <strong>SeHun Park</strong> on 08/07/2021</span></span></p>

<p style="text-align:justify;"> </p>

<hr /><h1 style="text-align:justify;"><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>What is Subquery </b></span></span></h1>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">A subquery is a query that appears inside another query statement. Subquery enables us to extract the desired data with a single query. For example, if you need to extract information about employees who have salary that is higher than last year’s average salary, you can use the following subquery: </span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/9008dedc21e9eccabc1c3da17ab37dd7.png" alt="subquery1.png" style="" /></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">It is possible to write a single query as above without writing another query statement to find out the average salary. Subquery like this has various special properties, and their properties vary depending on where they are written.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/8ab82350f3c07b869a6614721a71f498.png" alt="subquery2.png" style="" /></span></span></p>

<ul><li style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">scalar subquery: A subquery in a SELECT clause. Only one piece of data can be viewed.</span></span></li>
	<li style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">inline view: A subquery in the FROM clause. Multiple data inquiry is possible.</span></span></li>
	<li style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">subquery: A subquery in the WHERE clause. It depends on the operator and the properties of the scalar subquery or inline view. </span></span></li>
</ul><p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The use of subqueries makes queries more versatile but it can adversely affect query performance.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<hr /><h1 style="text-align:justify;"><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>The Sequence of Subquery Execution and Causes of Performance Degradation</strong></span></span></h1>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">A subquery is always executed before the main query to store temporary results. And as the main query is executed, the temporarily stored data of the subquery is retrieved to obtain the desired result.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">For example, the subquery is executed first, the result is stored in the temporary storage, and the final result is extracted by checking the condition 'a.pk = 3'.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/bf7333294914ced59d87fd6de2026ad7.jpg" alt="ccd42a160a189d65cd6b3d43a5e85199.jpg" style="" /></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">As the number of subquery results increases, useless data will be stored during the process. And also, the index cannot be used because it is searched from the temporary data stored in the middle.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">This kind of query process is very inefficient. Does DBMS execute the above query as we describe? No.</span></span></p>

<p style="text-align:justify;"> </p>

<hr /><h1 style="text-align:justify;"><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>View Merging</b></span></span></h1>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Removing the in-line view and merging it into the main query is called view merging.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/a88113ccfd4868b6266f27ccfb996ca9.jpg" alt="vewmerging_1.jpg" style="" /></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">With view merging, there is no need to store temporary data, and index scans for pk are now possible. No matter how the user writes the subquery, if it is possible to merge with the main query, the DBMS proceeds with the merger. The merging of these views serves to remove the constraint of the execution order before going to the OPTIMIZER phase; which is, putting all the tables on the same level and finding the most optimal execution plan.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/a202b750aaeb20ea67c32cbbbc357d97.jpg" alt="viewmerging2.jpg" style="" /></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the case of the above query, the join of tbl2 and tbl3 in the subquery always proceeds together before the view is merged. For example, a join order such as tbl3-&gt;tbl1-&gt;tbl2 is not possible. The merging of views is ultimately aimed at removing the constraint of the execution order and allowing OPTIMIZER to find the optimal execution plan.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID supports view merging including in-line views from CUBRID 11.2. In the previous version, view merging was performed only for view objects, but this function has been expanded from CUBRID 11.2.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<hr /><h1 style="text-align:justify;"><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Subquery UNNSET</strong></span></span></h1>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">This is a rewriting technique applied to the subquery of the WHERE clause. Typically, it targets IN and EXISTS operators.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/4c585e5a926e66ac554e5e3de05827b5.jpg" alt="subquery unnset1.jpg" style="" /></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">How is the above query executed?</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In CUBRID, the IN operator extracts the data of the main query as the result of the subquery. If you think of it as table join order, tbl2 ==&gt; tbl1 order.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Then what about other operators?</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/ec9f252fb47855a77a8ede2bf0a81cf0.jpg" alt="susbquery unnset2.jpg" style="" /></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The case for EXISTS operator is the opposite. If we express it in join order, the order will be tbl1 ==&gt; tbl2. Depending on how the query is written, there are restrictions on the order of performance. Depending on the amount of data in the subquery and main query, IN operator may be advantageous or vice versa.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Overcoming this situation is the SUBQUERY UNNEST technique.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/064/828/003/2179b10105041498e0061511780e075f.jpg" alt="subqueryunnset3.jpg" style="" /></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If it is converted to a join as above, OPTIMIZER can choose which table to look up first. Rewriting the subquery of the WHERE clause as a join is called SUBQUERY UNNEST.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">One peculiarity is that the IN and EXISTS operators must not affect the result of the main query even if there is duplicate data in the result of the subquery.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">For that reason, a Semi Join is performed instead of a normal join. A Semi Join stops the search when the first data is found and proceeds to the next search. Semi Join is a join method used to achieve the same result as an operator such as IN.</span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">(However, CUBRID has not supported SUBQUERY UNNEST yet. It is recommended to use IN and EXISTS operators according to the situation.)</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">By rewriting the query, the DBMS removes the constraint on the execution order implied in the query. Converting an OUTER JOIN to an INNER JOIN, or deleting an unnecessary table or query entry, serves the same purpose.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">OPTIMIZER will be able to create an optimal execution plan in a situation where there is no restriction on the execution order as much as possible. And it will eventually increase query performance and allow DBMS users to get the data they want quickly.</span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Sometimes, when users check the execution plan of a query, it appears completely different from the query and users are confused. Understanding the query rewrite technique will be a great help. </span></span><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Currently, the CUBRID development team is working on rewriting these queries and improving OPTIMIZER. In the next blog, we will talk about what does OPTIMIZER do to find the optimal execution plan.</span></span></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID DBLink]]></title>
		<id>https://www.cubrid.org/3828038</id>
		<published>2022-06-27T13:19:09+00:00</published>
		<updated>2022-06-27T13:22:52+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3828038"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3828038#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align:right;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by <strong>DooHo Kang</strong> on 27/06/2022</span></span></p>

<p> </p>

<hr /><h1><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>What is CUBRID DBLink</b></span></span></h1>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">When retrieving information from a database, it is often necessary to retrieve information from an external database. Therefore, it is necessary to be able to search for information on other databases. CUBRID DBLink allows users to use the information on other databases.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID DBLink provides a function to inquire about information in the databases of homogeneous CUBRID and heterogeneous Oracle and MySQL.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">* It is possible to set up multiple external databases, but when searching for information, it is possible to inquire about information from only one other database.</span></span></p>

<p> </p>

<hr /><h1><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>CUBRID DBLink Configuration</b></span></span></h1>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID DBLink supports DBLink between homogeneous and heterogeneous DBLinks.</span></span></p>

<p> </p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Homogeneous DBLink diagram</span></span></li>
</ul><p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If you look at the configuration diagram for inquiring about information of a homogeneous database, you can use CCI in Database Server to connect to homogeneous brokers and inquire about information from an external database.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/5e0c762707f48e9525511e33a521d403.png" alt="Homogeneous DBLink diagram.png" style="" /></p>

<p> </p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Heterogeneous DBLink diagram</span></span></li>
</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If you look at the configuration diagram for inquiring about the information in heterogeneous databases, you can inquire about information in heterogeneous databases through GATEWAY.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/cc6d3d807bf67f40f6bed92ec56753fd.png" alt="Heterogeneous DBLink diagram.png" style="" /></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">*GATWAY uses ODBC (Open DataBase Connectivity). </span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Please refer to CUBRID 11.2 manual for detailed information about <a href="https://www.cubrid.org/manual/en/11.2/sql/dblink.html?highlight=dblink#gateway" target="_blank">GATWAY</a>.</span></span></p>

<p> </p>

<hr /><h1><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>Setting Up CUBRID DBLink</b></span></span></h1>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"> Homogeneous DBLink Setting</span></span></li>
</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If you look at the Homogeneous configuration diagram above, you need to connect to the broker of the external database, so you need to set up the broker for the external database. This setting is the same as the general broker setting.</span></span></p>

<p> </p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Heterogeneous DBLink Setting</span></span></li>
</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">It is necessary to set the information to connect to a heterogeneous type (Oracle/MySQL), and the heterogeneous setting value must be written in GATEWAY.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">GATEWAY can be configured through the parameters of cubrid_gateway.conf .</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">(For reference, since GATEWAY uses ODBC, unixODBC Driver Manager must be installed for Linux.)</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">This is an example of DBLink configuration in cubrid_gateway.conf.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/add7effc5edb279efa29b6b835a2b068.png" alt="gateway configuration example.png" style="" /></p>

<p> </p>

<hr /><h1><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>How to Use CUBRID DBLink</b></span></span></h1>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the case of setting up homogeneous brokers and heterogeneous gateways, let’s look at how to write Query statements to inquire about database information. There are two ways to write a DBLINK Query statement for data inquiry.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">First, how to query information from other databases by writing DBLINK syntax in the FROM clause. The Query statement below is a Query statement that inquires about the remote_t table information of another database of IP 192.168.0.1.</span></span></p>

<p> </p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/775b211c6f79c0ce599eed7bdb0af56e.png" alt="query1.png" style="" /></p>

<p><span style="font-family:verdana, geneva, sans-serif;font-size:18px;">As you can see in the above syntax, you can see the SELECT statement for retrieving connection information and other database information, It is divided into three parts: the virtual table and column name corresponding to the SELECT statement.</span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Secondly, DBLINK Query statement requires connection information to connect to other databases. If the connection information is the same and only the SELECT statement needs to be changed, the connection information is updated every time a Query statement is written. and there is a risk that user information (id, password) is exposed to the outside.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Therefore, if you use the CREATE SERVER statement for such trouble and information protection, it is simpler than the Query statement and helps to protect user information.</span></span></p>

<p> </p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/f02bd2c29b39e362532b21c30da6b630.png" alt="query2.png" style="" /></p>

<p><span style="font-family:verdana, geneva, sans-serif;font-size:18px;">If you look at the above syntax, you can replace the Connection information with remote_srv1.</span></p>

<p> </p>

<hr /><h1><span style="font-size:26px;"><span style="font-family:verdana, geneva, sans-serif;"><b>Retrieving Information from External Database using CUBRID DBLink</b></span></span></h1>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Now that we have completed the setup for using CUBRID DBLink, we can retrieve information from the CUBRID database and other databases.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The example below shows CUBRID information and MySQL information by retrieving MySQL information from CUBRID.</span></span></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID Table Information </span></span></li>
</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">​</span></span><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/1e51568227bfb38ddbf2abba896a6dfa.png" alt="cubrid table info.png" style="" /></p>

<p> </p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">MySQL Table Information </span></span></li>
</ul><p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/cbd01db44814978bf9df910cbb394894.png" alt="mysql table info.png" style="" /></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">DBLink Query </span></span></li>
</ul><p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/b3691c68e9e54f873586e8078564b8b9.png" alt="dblink query.png" style="" /></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">DBLink Query Execution Result </span></span></li>
</ul><p><img src="https://www.cubrid.org/files/attach/images/3826714/038/828/003/7cba92e2f3b8a268cd0ebd30afdffaa5.png" alt="query result.png" style="" /></p>

<p><span style="font-family:verdana, geneva, sans-serif;font-size:18px;">This is the result of searching CUBRID information and MySQL information at the same time.</span></p>

<p> </p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID INTERNAL: CUBRID Double Write Buffer]]></title>
		<id>https://www.cubrid.org/3827979</id>
		<published>2022-03-08T08:13:36+00:00</published>
		<updated>2022-03-08T08:27:26+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827979"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827979#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by <strong>MyungGyu</strong><b>&nbsp;Kim</b>&nbsp;on 03/08/2022</span></span></p>

<p style="text-align: right;">&nbsp;</p>

<h1><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>INTRODUCTION</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Data in the database is allocated from disk to memory, some data is read and then modified, and some data is newly created and allocated to memory. Such data should eventually be stored on disk to ensure that it is permanently stored. In this article, we will introduce one of the methods of storing data on disk in CUBRID to help you understand the CUBRID database.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The current version at the time of writing is CUBRID 11.2.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1 style="text-align: justify;"><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>DOUBLE WRITE BUFFER</strong></span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">First of all, I would like to give a general description of the definition, purpose, and mechanism of Double Write Buffer.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>What is Double Write Buffer?</strong></span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">By default, CUBRID stores data on disk through Double Write Buffer. <strong>Double Write Buffer</strong> is a buffer area composed of both memory and disk. By default, the size is set to 2M, and the size can be adjusted up to 32M in the <span style="color:#FF8C00;">cubrid.conf</span> file.</span></span></p>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">*Note:<strong>&nbsp;</strong></span></span><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In CUBRID, the user can store the DB page directly to disk or using Double Write Buffer. In this article, we will only focus on the method of storing DB page using Double Write Buffer.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>The Purpose&nbsp;</strong></span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When storing data on a disk, the Double Write Buffer generated in this way may prevent the corrupted DB page&nbsp;from being stored. The DB page-level&nbsp;corruption occurs for the following reasons:</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/979/827/003/3fa25f871192554416a9cce3b3840808.jpg" alt="1.jpg" style="" /></span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this document, it is assumed that 1 DB page existing in memory consists of 4 OS pages of Linux or Windows. When such a DB page is stored on disk, it is stored through a mechanism called flush.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When the DB page is stored to the disk through the flush mechanism, the DB page is divided and stored in units of OS pages. As shown in the figure above, if the system is shut down abruptly when the DB page is not stored on the disk, the DB page is broken. (Note: This disk write is called Partial Write.)</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>The Process&nbsp;</strong></span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The DB page of CUBRID is stored on&nbsp;disk as follows through the Double Write Buffer.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img src="https://www.cubrid.org/files/attach/images/3826714/979/827/003/17676385924c8d41e52780ee71682b36.jpg" alt="2.jpg" style="" /></span></span></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">As above, one DB page composed of 4 OS pages is stored in the Double Write Buffer in memory. After that, it is stored once in the DB internal Double Write Buffer and twice in the DB file.&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The process of storing in Double Write Buffer in memory can be described in detail as follows:</span></span></p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">DB pages are stored in one slot in the Double Write Buffer of memory, and these slots are combined to form a block. (The green square in the figure below is one block). </span></span>

	<ul>
		<li><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">These contiguous blocks are called Double Write Buffer in memory.</span></span></li>
	</ul>
	</li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When one block is full of slots, it is stored to the disk through a mechanism called flush, which proceeds in blocks.&nbsp;</span></span></li>
</ul>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="https://www.cubrid.org/files/attach/images/3826714/979/827/003/ef2c6e25da1b46ab6e25ddf02ca4e07f.jpg" alt="3.jpg" style="" /></span></span></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The process of storing DB page from the Double Write Buffer in memory to the DB on disk executes the following two processes in order:</span></span></p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A single block full of slots is stored in the DB internal Double Write Buffer.</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Store the page to&nbsp;disk located in the same location as the stored page in a single block.</span></span></li>
</ul>

<p style="text-align: justify;">&nbsp;</p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>When data storage in&nbsp;the DB internal&nbsp;Double Write Buffer fails</strong></span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this case, in order to prevent the broken data from being stored on disk, the CUBRID server is stopped during the process of the server restart or creating a new Double Write Buffer, so that data not yet written to the disk is written.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;</span></span></p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>When data storage in the disk internal DB fails</strong></span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">After allocating the Double Write Buffer stored in the DB to the memory, the page inside the block is compared with the page stored inside the DB. It prevents the DB page from being saved to the disk in a broken state by re-flushing only the broken DB page in the DB area.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h3 style="text-align: justify;"><span style="font-size:24px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>When the DB page is&nbsp;stored in the DB</strong></span></span><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;</span></span></h3>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The Double Write Buffer inside the DB remains the same, and the next block is overwritten when the DB page is stored on the disk through the flush. That is, the Double Write Buffer is continuously maintained.&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h1 style="text-align: justify;"><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><b>CONCLUSION</b></span></span></h1>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Through the above process, the DB page using the Double Write Buffer can be&nbsp;stored and the broken DB page can be prevented from being stored.&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<p style="text-align: justify;"><span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;"><b>REFERENCE</b></span></span></p>

<ol>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID Manual -&nbsp;<a href="http:// https://www.cubrid.org/manual/en/11.0/" target="_blank"><span style="color:#000000;">https://www.cubrid.org/manual/en/11.0/</span></a></span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID Source Code -&nbsp;<a href="https://github.com/CUBRID/cubrid" target="_blank"><span style="color:#000000;">https://github.com/CUBRID/cubrid</span></a></span></span></li>
</ol>

<p style="text-align: justify;">&nbsp;</p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[Monitoring CUBRID through Scouter]]></title>
		<id>https://www.cubrid.org/3827915</id>
		<published>2022-01-18T10:01:45+00:00</published>
		<updated>2022-01-18T10:11:29+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827915"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827915#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by <b>TaeHwan Seo</b>&nbsp;on 01/18/2022</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID users can monitor items in CUBRID through the Scouter. </span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">It was developed based on CUBRID 11.0 version. Full features are available from CUBRID 10.2.1 Version.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Scouter (Server, Client) is available from version 2.15.0, bug fixes and features will be added by participating in Scouter GitHub in the future.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The latest version of Scouter (as in 2022.01.18) is Scouter 2.15.0, Multi Agent support and bug fixes are currently in the PR stage.&nbsp;</span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h3><span style="font-size:28px;"><strong><span style="font-family:verdana,geneva,sans-serif;">1. What is Scouter?</span></strong></span></h3>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Scouter is an Open Source Application Performance Management (APM), it provides monitoring function for applications and OS.&nbsp;</span></span></p>

<p>&nbsp;</p>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;Scouter Basic Configuration&nbsp;</span></span></h4>
	</li>
</ul>

<p style="margin-left: 40px;"><img src="https://www.cubrid.org/files/attach/images/3826714/915/827/003/2ecde919f9a437368bf4d35e26c6484d.jpg" alt="scouter configuration.jpg" style="" /></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Scouter-provided Information</span></span></h4>
	</li>
</ul>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">​- <u>WAS Basic Information</u></span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Response speed/profiling information for each request, number of server requests/number of responses, number of requests in process, average response speed, JVM memory usage / GC time, CPU usage.</span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- <u>Profiling Information</u></span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Server-to-server request flow, execution time/statistics of each SQL query, API execution time, request header information, method invocation time.</span></span></p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;Representative Agent List&nbsp;</span></span></h4>
	</li>
</ul>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Tomcat Agent (Java Agent)&nbsp;: gathering profiles and performance metrics of JVM &amp; Web application server</span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Host Agent (OS Agent)&nbsp;: gathering performance metrics of Linux, Windows, and OSX</span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- MariaDB Plugin : A plugin for monitoring MariaDB (embedded in MariaDB)</span></span></p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Telegraf Agent : Redis, nginX, apache httpd, haproxy, Kafka, MySQL, MongoDB, RabbitMQ, ElasticSearch, Kube, Mesos ...</span></span></p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<h3><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>2. CUBRID &amp; Scouter&nbsp;</strong></span></span></h3>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Composition&nbsp;</span></span></h4>
	</li>
</ul>

<p style="margin-left:30.0pt;"><img src="https://www.cubrid.org/files/attach/images/3826714/915/827/003/1e3938815eab5c0a81613835f45ef9a8.png" alt="4a1384ba078eb327507cc2977ef929c9.png" style="" /></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Information on CUBRID is transmitted to CUBRID Agent via CMS to HTTPS; items that are separated by item in CUBRID Agent are transmitted continuously through UDP and requested items are transmitted through TCP. To Scouter Server (Collector).</span></span></p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The Server (Collector) stores the data in its own database and the stored data is automatically deleted by the settings (capacity, period).</span></span></p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The Client requests the collected data from Server (Collector) by TCP and displays it on the screen using Eclipse RCP.</span></span></p>

<p style="margin-left:30.0pt;">&nbsp;</p>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In the above figure, the green circle part is the part modified by the Scouter to monitor the CUBRID.</span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Available Monitoring Items</span></span></h4>
	</li>
</ul>

<p style="margin-left: 40px;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">The table below is the list of monitoring items that are currently available on Scouter. We plan to add items that can be monitored through CMS (CUBRID Manager Server), Scouter Server, Client, and Agent extensions later.&nbsp;</span></span></p>

<p style="margin-left: 40px;">&nbsp;</p>

<p style="margin-left: 40px;"><img src="https://www.cubrid.org/files/attach/images/3826714/915/827/003/a694c1d59e90bf04c262a6ca9fd057a4.jpg" alt="monitoring item.jpg" style="" /></p>

<p style="margin-left: 40px;">&nbsp;</p>

<p style="margin-left: 40px;">&nbsp;</p>

<ul>
	<li>
	<h4><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Client UI</span></span></h4>
	</li>
</ul>

<p style="margin-left:30.0pt;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The picture below is the initial screen in the Client.&nbsp;</span></span><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Installation and Client UI documentation can be found through the Readme document on Scouter Agent GitHub. (Reference URL 2&amp;3).&nbsp;</span></span></p>

<p style="margin-left: 40px;">&nbsp;</p>

<p style="margin-left: 40px;"><img src="https://www.cubrid.org/files/attach/images/3826714/915/827/003/e5ec7e6ed42f5ae0c3d856f4afca7ff6.png" alt="Client UI.png" style="" /></p>

<p>&nbsp;</p>

<p style="margin-left: 40px;">&nbsp;</p>

<p style="margin-left: 40px;">&nbsp;</p>

<h3><strong><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;">3. Reference</span></span></strong></h3>

<ul>
	<li><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Scouter Agent GitHub -&nbsp;<a href="https://github.com/scouter-contrib/scouter-agent-cubrid" target="_blank">GitHub - scouter-contrib/scouter-agent-cubrid: scouter cubrid agent</a></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Quick Start Guide&nbsp;-&nbsp;<a href="https://github.com/scouter-contrib/scouter-agent-cubrid/blob/main/documents/quick_start_KR.md" target="_blank">https://github.com/scouter-contrib/scouter-agent-cubrid/blob/main/documents/quick_start_KR.md</a></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Client UI Guide -&nbsp;<a href="https://github.com/scouter-contrib/scouter-agent-cubrid/blob/main/documents/client_guide_KR.md" target="_blank">scouter-agent-cubrid/client_guide_KR.md at main &middot; scouter-contrib/scouter-agent-cubrid &middot; GitHub</a></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Scouter GitHub -&nbsp;<a href="https://github.com/scouter-project/scouter" target="_blank">GitHub - scouter-project/scouter: Scouter is an open source APM (Application Performance Management) tool.</a></span></span></li>
</ul>

<p style="margin-left: 40px;">&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[QUERY CACHE Hint]]></title>
		<id>https://www.cubrid.org/3827902</id>
		<published>2021-12-09T14:31:04+00:00</published>
		<updated>2021-12-09T14:44:26+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827902"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827902#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Written by&nbsp;<strong>MinJong Kim</strong>&nbsp;on&nbsp;12/09/2021</span></span></p>

<h2 style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><strong><span style="font-size:36px;">ABOUT QUERY CACHE</span>&nbsp;</strong></span></h2>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">With the release of CUBRID 11.0, the CUBRID DBMS supports QUERY CACHE hint.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this article, we will take some time to look at QUERY CACHE.&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h4 style="text-align: justify;">&nbsp;</h4>

<h4 style="text-align: justify;"><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;">1. What is Query Cache?</span></span></h4>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Query Cache is a DBMS feature that stores the statements together with the retrieved record set in memory using the SELECT query statement and returns the previously cached values when the identical query statement is requested.</span></span></p>

<p style="margin-left: 40px; text-align: justify;">&nbsp;</p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The query cache can be useful in an environment where you have tables that do not change very often and for which the server receives many identical queries. Queries using the QUERY_CACHE hint are cached in a dedicated memory area, and the results are also cached in separate disk space.&nbsp;&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Query Cache </strong><strong>Features&nbsp;</strong></span></span></li>
</ul>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">1. The QUERY_CACHE hint only applies to SELECT statements.</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">2. When a table change (INSERT, UPDATE, DELETE) occurs, the information in the Query Cache related to the table is initialized.</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">3.&nbsp;When the DB is unloaded, the Query Cache is initialized.</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">4. The cache size can be adjusted through the max_query_cache_entries and query_cache_size_in_pages setting (The default value is all 0).&nbsp;</span></span></p>

<p style="margin-left: 80px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">max_query_cache_entries is the setting value for the maximum number of queries that can be cached. If it is set to 1 or more, as many queries as the set number are cached.</span></span></p>

<p style="margin-left: 80px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">query_cache_size_in_pages is the setting value for the maximum cacheable result pages. If it is set to 1 or more, the results for the set page are cached.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Pros for Query Cache</strong></span></span></p>
	</li>
</ul>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When the hint is set and a new SELECT query is processed, the query cache is looked up if the query appears in the query cache. If the query is found from the cache, the data stored in the cache will be returned immediately without going through the previous 3 steps (Parsing-&gt;Optimizing-&gt;Executing). Therefore, the higher the cost of the query and the more repeatedly invoked, the greater the resource benefits.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h4 style="text-align: justify;">&nbsp;</h4>

<h4 style="text-align: justify;"><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;">2. How to use the Query Cache</span></span></h4>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><b>How to use?&nbsp;</b></span></span></p>
	</li>
</ul>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">1. Set the values of max_query_cache_entries and query_cache_size_in_pages&nbsp; in the cubrid.conf file. (Example: if the number of sql statements to cache is 10, set the max_query_cache_entries value to 10, and set query_cache_size_in_pages to 640 when the result size is 10M.)</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">2. Add the /*+ QUERY_CACHE */ hint to the select statement.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li>
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Procedure&nbsp;</strong></span></span></p>
	</li>
</ul>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>​</strong><br />
&nbsp; &nbsp; &nbsp;&nbsp;</span></span><img src="https://www.cubrid.org/files/attach/images/3826714/902/827/003/9e900faa29420afb1b49d0b8fca38c39.png" alt="1.png" style="" /></p>

<p>&nbsp;</p>

<ol style="margin-left: 40px;">
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When the hint is set and a new SELECT query is processed, the query cache is looked up if the query appears in the query cache.</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If the cached query is not found, the query will be processed and then cached newly with its result.</span></span></li>
</ol>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Result Analysis&nbsp;</strong></span></span></li>
</ul>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; &nbsp; &nbsp; You can check whether a query is cached by entering the session command ;info qcache in CSQL.<br />
&nbsp; &nbsp; &nbsp; example)&nbsp;</span></span></p>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; &nbsp; &nbsp;</span></span><img src="https://www.cubrid.org/files/attach/images/3826714/902/827/003/f44f2d1cfaad2dc4797a99920b215aec.png" alt="2.png" style="" /></p>

<p style="text-align: justify; margin-left: 80px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The cached query is shown as query_string in the middle of the result screen. Each of the n_entries and n_pages represents the number of cached queries and the number of pages in the cached results.</span></span></p>

<p style="text-align: justify; margin-left: 80px;">&nbsp;</p>

<p style="text-align: justify; margin-left: 80px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The n_entries is limited to the value of configuration parameter max_query_cache_entries and the n_pages is limited to the value of query_cache_size_in_pages.</span></span><br />
&nbsp;</p>

<p style="text-align: justify; margin-left: 80px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If the n_entries is overflown or the n_pages is overflown, some of the cache entries are selected for deletion. The number of caches deleted is about 20% of max_query_cache_entries value and of the query_cache_size_in_pages value.</span></span></p>

<p style="text-align: justify; margin-left: 80px;">&nbsp;</p>

<h4 style="text-align: justify;">&nbsp;</h4>

<h4 style="text-align: justify;"><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;">3. Cautions</span></span></h4>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--[if--><!--[endif]--><strong>The hint is applied to SELECT query only; However, for the following cases, the hint does not apply to the query and the hint is meaningless: </strong></span></span><!--![endif]--><!--![if--></p>

<p style="text-align: justify;">&nbsp;</p>

<ul style="list-style-type: circle; margin-left: 40px;">
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--[if--><!--[endif]-->a system time or date related attribute in the query as below<br />
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; example) SELECT SYSDATE, ADDDATE (SYSDATE, INTERVAL -24 HOUR), ADDDATE (SYSDATE, -1);</span></span><!--![endif]--><!--![if--></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">a SERIAL related attribute is in the query</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--![endif]--><!--![if--><!-- --><!--[if--><!--[endif]-->a column-path related attribute is in the query</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--![endif]--><!--![if--><!-- --><!--[if--><!--[endif]-->a method is in the query</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--![endif]--><!--![if--><!-- --><!--[if--><!--[endif]-->a stored procedure or a stored function is in the query</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--![endif]--><!--![if--><!-- --><!--[if--><!--[endif]-->a system table like dual, _db_attribute, and so on, is in the query</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><!--![endif]--><!--![if--><!-- --><!--[if--><!--[endif]-->a system function like sys_guid() is in the query<!--![endif]--><!--![if--><!--[if--><!--[endif]--> </span></span><!--![endif]--><!--![if--><!--![endif]--><!--![if--><!--![endif]--><!--![if--><!--![endif]--><!--![if--><!--![endif]--><!--![if--><!--![endif]--><!--![if--><!--![endif]--><!--![if--></li>
</ul>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li style="text-align: justify;">
	<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><b>Lock waiting situation may occur due to the table change</b></span></span></p>
	<span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If there is any change (ex. INSERT, UPDATE, DELETE) to the target table, the existing cache is always removed. At this time, other transactions will now lock the data to prevent it from grabbing any more invalid data. Until this lock is released, transactions accessing the Query Cache wait in the lock state. Therefore, the more frequently the table is changed, the more SELECT queries that use the Query Cache, the more time is spent waiting for this lock.</span></span></li>
</ul>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">​</span></span></p>

<h4 style="text-align: justify;"><span style="font-size:28px;"><span style="font-family:verdana,geneva,sans-serif;">4. Conclusion</span></span></h4>

<p style="text-align: justify; margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Query Cache is useful for data that does not change frequently but needs to be accessed frequently, such as street name, address, organization information, department information, etc. In this case, Query Cache can help reduce system resource usage and improve performance.&nbsp;</span></span></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID INSIDE: HASH SCAN Method]]></title>
		<id>https://www.cubrid.org/3827871</id>
		<published>2021-11-09T08:09:46+00:00</published>
		<updated>2022-03-03T14:09:59+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827871"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827871#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: right;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by&nbsp;<strong>SeHun Park</strong>&nbsp;on&nbsp;11/09/2021</span></span></p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- HASH SCAN</span></span></strong></p>

<hr />
<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">Hash Scan is a scan method for hash join. Hash Scan is applied in view or hierarchical query. When a subquery such as view is joined as inner, index scan cannot be used. In this case, performance degradation occurs due to repeated inquiry of a lot of data. In this situation, Hash Scan is used.</span></span></p>

<p><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/0c478eb70afaf8a4259f3f9b19441f0f.jpg" alt="hash scan vs nl.jpg" style="" /></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The picture above shows the difference between Nested Loop join and Hash Scan in the absence of an index. In the case of NL join, the entire data of INNER is scanned as many as the number of rows of OUTER. In contrast, Hash Scan scans INNER data once when building a hash data structure and scans OUTER once when searching. Therefore, you can search for the desired data relatively very quickly.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Here, the internal structure of Hash Scan is written as the flow of the program development process.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;">&nbsp;</p>

<p>&nbsp;</p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- IN-MEMORY HASH SCAN</span></span></strong></p>

<hr />
<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID&#39;s Hash Scan uses in-memory, hybrid, and file hash data structures depending on the amount of data. First, let&#39;s look at the in-memory structure.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The advantage of the in-memory hash scan structure is there is no performance degradation during random access. However, the disadvantage of this structure is that the memory size is limited. It cannot be used in all cases due to its disadvantages, but it is the fastest method due to its advantages. Because of its advantage, it is suitable for chaining hash structures.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/da4443a57fbf56d65d5f26c50fbf4f58.jpg" alt="in-memory hash table.jpg" style="" /></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If there is a collision of hash key values, a new entry is put into the next pointer. It is a simple and fast structure. However, when implemented in file format, problems with random access or space utilization may occur. More details about this will be discussed in the following File Hash Structure section. CUBRID performs in-memory hash scan only within a limited size. You can change the limit size using the <strong>max_hash_list_scan_size</strong> system parameter.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">At this stage, rather than implementing an in-memory hash data structure, it was necessary to analyze OPTIMIZER and EXECUTOR and think more about which part should be modified. You can refer to the following link for details about it. Moreover, you can check the design-related contents in JIRA and the results of code review in GIT.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">JIRA:&nbsp;<a href="http://jira.cubrid.org/browse/CBRD-23665" target="_blank">http://jira.cubrid.org/browse/CBRD-23665</a></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">GIT:&nbsp;<a href="https://github.com/CUBRID/cubrid/pull/2389" target="_blank">https://github.com/CUBRID/cubrid/pull/2389</a></span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;">&nbsp;</p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- HYBRID HASH SCAN</span></span></strong></p>

<hr />
<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:18px;">This is a method of storing the OID (Object Identifier) of the temp file, not DATA, in the value of the in-memory hash data structure.</span><br />
<img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/8817061c5a65a8674b2da50b0463c74f.jpg" alt="memory hash table with temp file.jpg" style="" /></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Because OIDs are smaller than DATA, in-memory hash data structures can be used in larger data sets. This method is relatively slower than the in-memory hash method because data from the temp file must be read at the time of lookup. This is the second scan method considered in the hash scan. Check out the link below for more details.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">JIRA:&nbsp;<a href="http://jira.cubrid.org/browse/CBRD-23828" target="_blank">http://jira.cubrid.org/browse/CBRD-23828</a></span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">GIT:&nbsp;<a href="https://github.com/CUBRID/cubrid/pull/2537" target="_blank">https://github.com/CUBRID/cubrid/pull/2537</a></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- FILE HASH SCAN</span></span></strong></p>

<hr />
<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A scan method that uses the file hash data structure. The extendible hash data structure is applied.</span></span></p>

<p>&nbsp;</p>

<p><br />
<span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/021a050efdb81f3986486bf11ff68bba.jpg" alt="extendible hash.jpg" style="" /></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-family:verdana,geneva,sans-serif;">T<span style="font-size:18px;">he diagram above shows the operation of the extendible hash algorithm. When overflow occurs, the bucket is divided. Because it operates in this way of partitioning, it is an algorithm that can maintain the bucket space utilization rate above 50%. Since one bucket is implemented as a page, which is the smallest unit of disk I/O, the higher the bucket space utilization, the lower the disk I/O. For this reason, file hash scans use an extendible hash algorithm.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p>&nbsp;</p>

<p><br />
<span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/ed0072aeb6dc3f7e439bb4ad4f5ec3d7.jpg" alt="file hash scan.jpg" style="" /></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">This is the implementation of the extendible hash data structure in CUBRID. The Directory file stores the VPID, which is the Page Identifier. One Bucket is implemented as one page. The data in the Bucket is sorted, so the lookup uses a binary search.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">One drawback of extendible hash data structures is that there are no exceptions for duplicate data values. For example, if overflow occurs because the same value is all stored in one bucket, it is an algorithm that can no longer be stored. For this, a new Duplicate Key Bucket is created and added in the form of chaining. If more than a certain amount of data is duplicated, the data is moved to the DK bucket. Through this, a file hash scan with excellent space utilization while being able to flexibly store duplicate values is completed. Visit the following links for a detailed explanation.</span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">JIRA:&nbsp;<a href="http://jira.cubrid.org/browse/CBRD-23816" target="_blank">http://jira.cubrid.org/browse/CBRD-23816</a></span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">GIT:&nbsp;<a href="https://github.com/CUBRID/cubrid/pull/2781" target="_blank">https://github.com/CUBRID/cubrid/pull/2781</a></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- HASH SCAN for Hierarchical Queries</span></span></strong></p>

<hr />
<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A hierarchical query has a special limitation in that it is necessary to perform a lookup between the hierarchies after the join. Because of this, index scans cannot be used for hierarchical queries with joins. What you need in this situation is a hash scan, right? It has been modified so that hash scan can be used for hierarchical queries as well. Check the link below for more details.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">JIRA:&nbsp;<a href="http://jira.cubrid.org/browse/CBRD-23749" target="_blank">http://jira.cubrid.org/browse/CBRD-23749</a></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">GIT:&nbsp;<a href="https://github.com/CUBRID/cubrid/pull/2520" target="_blank">https://github.com/CUBRID/cubrid/pull/2520</a></span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;">&nbsp;</p>

<p><strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- HASH JOIN</span></span></strong></p>

<hr />
<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The in-memory hash scan is applied in the CUBRID11 version, and the file hash scan is applied in the CUBRID11.2 version which will be released soon. The hash join function is currently under development. The development of the hash join function is to add a new join method to OPTIMIZER. Currently, there are Nested Loop join and Sort Merge Join in CUBRID. The CUBRID development team is planning to improve the overall OPTIMIZER. OPTIMIZER will be able to generate a more optimal execution plan. And with that work, a hash join method will be added. Before the hash join is added, the execution plan cannot check whether a hash scan is used. Instead, you can check whether Hash Scan is used in the trace information.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/d1f92cc54cf00fada783cf6bfa72e788.jpg" alt="trace.jpg" style="" /></span></p>

<p>&nbsp;</p>

<p><br />
<strong><span style="font-family:verdana,geneva,sans-serif;"><span style="font-size:36px;">- HASH SCAN Performance</span></span></strong></p>

<hr />
<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In situations where a hash scan is required, the query performance has become incomparably faster than before.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/731/833/003/dec5833b0ddca7dcee2f5a6d472c90b2.jpg" alt="Performance of hash scan.jpg" style="" /></span></p>

<p>&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The performance is greatly improved compared to the previous case in cases where subqueries are joined as inner or hierarchical queries with joins. CUBRID analyzes the causes of several other cases and reflects improvements to improve query performance. Among these improvements, there are REWRITER improvements such as View Merging and Subquery unnest, and improvements related to View Merging are currently in progress. Next, we will learn how to transform a query in DBMS and why rewrite techniques such as View Merging and Subquery unnest are necessary.</span></span></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[Converting PL/SQL to CUBRID Java SP using ANTLR and StringTemplate]]></title>
		<id>https://www.cubrid.org/3827819</id>
		<published>2021-09-30T10:11:01+00:00</published>
		<updated>2022-05-23T11:45:07+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827819"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827819#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by<strong>&nbsp;Youngjin Joo&nbsp;</strong>on<strong>&nbsp;</strong>09/30/2021</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">CUBRID DBMS (hereinafter &#39;CUBRID&#39;) does not support PL/SQL.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If you want to continue your project by creating functions or subprograms with PL/SQL syntax in CUBRID, you need to convert them to Java Stored Function/Procedure (hereinafter &#39;Java SP&#39;).</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Database developers, administrators, and engineers are often familiar with PL/SQL syntax but not with programming languages. In addition, application development depends very little on the DBMS used, but converting PL/SQL to Java SP seems difficult because it feels like you&#39;re developing a new system.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Therefore, while I am looking for an easy way to convert PL/SQL to Java SP, I found out about ANTLR.&nbsp;</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">ANTLR is a tool for generating parsers.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">With the help of contributors around the world, ANTLR supports grammar files for parsing various programming languages. &nbsp;</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><a name="_Hlk81314465">The official website introduces ANTLR as follows.</a></span></span></p>

<p>&nbsp;</p>

<p style="margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><em><span style="color:#0000FF;">&quot;ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It&#39;s widely used to build languages, tools, and frameworks. </span>From a grammar, ANTLR generates a parser that can build and walk parse trees.&nbsp; (https://www.antlr.org/ - What is ANTLR?)&quot;</em></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this article, we will learn how to configure the ANTLR development environment and how to create parser classes from PL/SQL grammar files.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Now, let&rsquo;s test the class that converts pre-developed PL/SQL to Java SP.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The ANTLR development environment can be configured using various IDE tools such as Intellij, NetBeans, Eclipse, Visual Studio Code, Visual Studio, and jEdit.&nbsp;</span></span><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this article, we will use the Eclipse IDE tool.&nbsp;</span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>1. Installing the &#39;ANTLR 4 IDE&#39; in Eclipse</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">To use ANTLR in Eclipse, you need to install ANTLR 4 IDE from &#39;Help &gt; Eclipse Marketplace...&#39;.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/b14158c591421c976b7bc74fe204be6d.png" alt="image1.png" style="width: 526px; height: 875px;" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">After installing the ANTLR 4 IDE, create a project with &#39;General &gt; ANTLR 4 Project&#39;</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/ee89a35f3c9bc524ef91c112c53984ee.png" alt="image2.png" style="width: 518px; height: 501px;" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">After creating the ANTLR project, select &#39;Project Facets &gt; Java&#39; in the project settings.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/a182491619e5cd98b922a6e29b60e78d.png" alt="image3.png" style="width: 1206px; height: 694px;" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>2. Adding antlr-4.9-complete.jar file to project &#39;Java Build Path &gt; Libraries&#39;</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Even though the ANTLR 4 IDE is installed, we still need antlr-4.9-complete.jar file to use ANTLR.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">This file can be download from ANTLR official website, and it must be added to &nbsp;&#39;Java Build Path &gt; Libraries&#39;.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; &nbsp; - download&nbsp;: <a href="https://www.antlr.org/download.html">https://www.antlr.org/download.html</a></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/7215a61bfaf8b5863dd439da54891620.png" alt="image4.png" style="width: 620px; height: 465px;" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/eb3480a224490af7abf00194416d2756.PNG" alt="image9.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>3.&nbsp;</strong><b>How to create parser classes from PL/SQL grammar files</b></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Up to this point, the configuration of the ANTLR development environment has been completed.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">To create PL/SQL parser classes with ANTLR, we need the PL/SQL grammar file.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The grammar file is supported by ANTLR and can be downloaded from GitHub (antlr/grammars-v4).</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">After creating the parser classes, we also need to download the necessary basic parser class files.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; - download:&nbsp;<a href="https://github.com/antlr/grammars-v4/tree/master/sql/plsql">https://github.com/antlr/grammars-v4/tree/master/sql/plsql</a><br />
&nbsp; - download file:<br />
&nbsp; &nbsp; *&nbsp;java/PlSqlLexerBase.java<br />
&nbsp; &nbsp; * java/PlSqlParserBase.java<br />
&nbsp; &nbsp; *&nbsp;PlSqlLexer.g4<br />
&nbsp; &nbsp; *&nbsp;PlSqlParser.g4</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When parsing a PL/SQL code, an error occurs if it is in lowercase letters. To resolve this issue, ANTLR asks you to capitalize the PL/SQL code before parsing.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">You can bypass this problem by downloading the <strong>CaseChangingCharStream</strong> class and using it before parsing.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">We are using the <strong>CaseChangingCharStream</strong> class before passing the PL/SQL code to the PlSqlLexerd class, which is shown in the main function.&nbsp;</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp; - download:&nbsp;&nbsp;<a href="https://github.com/antlr/antlr4/tree/master/doc/resources">https://github.com/antlr/antlr4/tree/master/doc/resources</a><br />
&nbsp; - download file:&nbsp;<br />
&nbsp; &nbsp; *&nbsp;CaseChangingCharStream.java</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/5bcee8afc5f6343aa7775b544df861b8.PNG" alt="image5.PNG" style="width: 796px; height: 371px;" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>4. How to create parser classes from PL/SQL grammar file</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If you add the downloaded grammar files to the ANTLR project and run &#39;Run AS &gt; Generate ANTLR Recognizer&#39;, parser classes for parsing PL/SQL are created.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If these class files are in the Default Package state, they cannot be used as an Import when developing separate parser classes.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When &#39;Run AS &gt; Generate ANTLR Recognizer&#39; is executed, if the package setting is added to the Generate ANTLR Recognizer option, *.java files are created.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Simply add &#39;-package &lt;package name&gt;&#39; to &#39;Run As &gt; External Tools Configurations... &gt; ANTLR &gt; Arguments&#39;.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The package setting must be done with both grammar files (PlSqlLexer.g4, PlSqlParser.g4).</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/ccd0bcbd1c30efaa6690351992d2c4f3.png" alt="image6.png" style="width: 846px; height: 703px;" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When you run &#39;Run AS &gt; Generate ANTLR Recognizer&#39;, the parser classes are created in the &#39;target &gt; generated-sources &gt; antlr4&#39; directory even if they are bundled into a package.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">To make Eclipse aware of these files as sources, you must add the directory &#39;target &gt; generated-source &gt; antlr4&#39; to &#39;Java Build Path &gt; Source&#39;.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/26fdb7bda180a0ad928f536dc4629307.PNG" alt="image10.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/1d25c0157971f223eb3cb7b573b6e36e.PNG" alt="image11.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>5. Parsing PL/SQL with the created parser classes</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The MigrationPlsqlToJavaSP class reads the PL/SQL code in the compute_bonus.sql file and converts it to Java SP.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The PlSqlLexer and PlSqlParser classes are parser class files created by ANTLR using PL/SQL grammar files.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">PL/SQL parsing starts with the code &#39;parser.sql_script();&#39;.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">By following the child class of the Sql_scriptContext class returned as a result of parsing, you can extract and process the data needed to create Java SP.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Lastly, the make() method, which is called by the MigrationPlsqlToJavaSP class, uses StringTemplate to create Java SP class file.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/ea40005e2c411cfafefc3f9e3e9a34d7.png" alt="image7.png" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>6. </strong><strong>Testing the class that converts pre-developed PL/SQL to Java SP</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The following figure is the result of running PL/SQL in the compute_bonus.sql on Oracle.&nbsp;</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/86259d23d694584ebfbe86be551f8947.png" alt="image8.png" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">By following the result of parsing the compute_bonus.sql file, we extract and process the data needed to create a Java SP.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/288d32c1b3645b2f87a6a1b821b93fe0.PNG" alt="image14.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">StringTempate, which provides template syntax, is used to make data to be parsed and extracted into Java SP.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The official website introduces StringTemplate as follows.</span></span></p>

<p>&nbsp;</p>

<p style="margin-left: 40px;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><em>&quot;StringTemplate is a java template engine (with ports for C#, Objective-C, JavaScript, Scala) for generating source code, web pages, emails, or any other formatted text output. </em><em>(https://www.stringtemplate.org/ - What is StringTemplate?)&quot;</em></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/0183a75e78d0b1a6190bdd58918f1b75.PNG" alt="image13.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Below is the Java code converted to Java SP.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/3e532df968b50dac6fe34f966f08db3f.PNG" alt="image12.PNG" style="" /></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The example table in Oracle was transferred to CUBRID for testing.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><a href="https://www.stringtemplate.org/"><img src="https://www.cubrid.com/files/attach/images/7900/336/830/003/cd939a57507d3f9b6cb433d19f35f893.PNG" alt="image16.PNG" style="" /></a></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">It outputs the same result as when running PL/SQL in Oracle.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Last but not least</strong><strong>...</strong></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">So far, we can only convert the SELECT queries that are executed in the PL/SQL function.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The query can be executed from PL/SQL code or returning result value with just simple operations.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">ANTLR grammar allows us to parse all these parts. However, there are parts that are difficult to convert to Java code, so we haven&#39;t been able to proceed yet.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In the future, I would like to make a tool that converts PL/SQL to Java SP easily by refining the part that converts PL/SQL to Java SP and adding parts that can only be parsed but cannot be converted.</span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Since ANLTR supports the grammar of various programming languages besides PL/SQL, I think it is a good tool.</span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<hr />
<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><b>Reference&nbsp;</b></span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>1. ANTLR</strong><br />
&nbsp; - homepage: <a href="https://www.antlr.org/">https://www.antlr.org/</a><br />
&nbsp; -document: <a href="https://github.com/antlr/antlr4/blob/master/doc/index.md">https://github.com/antlr/antlr4/blob/master/doc/index.md</a><br />
&nbsp; - grammar files:<br />
&nbsp; &nbsp; * <a href="https://github.com/antlr/grammars-v4">https://github.com/antlr/grammars-v4</a><br />
&nbsp; &nbsp; * <a href="https://github.com/antlr/grammars-v4/wiki">https://github.com/antlr/grammars-v4/wiki</a><br />
&nbsp; - ANTLR IDE<br />
&nbsp; &nbsp; * <a href="https://www.antlr.org/tools.html">https://www.antlr.org/tools.html</a><br />
&nbsp; &nbsp; * <a href="https://github.com/jknack/antlr4ide">https://github.com/jknack/antlr4ide</a></span></span></p>

<p>&nbsp;</p>

<p><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>2. StringTemplate</strong><br />
&nbsp; - homepage: <a href="https://www.stringtemplate.org/">https://www.stringtemplate.org/</a></span></span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID Internal: Storage Management (Disk Manager, File Manager)]]></title>
		<id>https://www.cubrid.org/3827801</id>
		<published>2021-08-11T09:33:45+00:00</published>
		<updated>2021-08-11T09:35:14+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827801"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827801#comment"/>
		<author>
			<name><![CDATA[admin]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Written by<strong>&nbsp;Jaeeun, Kim&nbsp;</strong>on<strong>&nbsp;</strong>08/11/2021</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:22px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Introduction</strong></span></span></p>

<p style="text-align: justify;"><br />
<span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Database, just as its name implies, it needs spaces to store data. CUBRID, the open source DBMS that operates for the operating system allocates as much space as needed from the operating system and uses it efficiently as needed.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In this article, we will talk about how CUBRID internally manages the storage to store data in the persistent storage device. Through this article, we hope developers can access the open source database CUBRID more easily.</span></span><br />
<!--![endif]--><!--![if--></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- The content of this article is based on version 10.2.0-7094ba. (However, it seems to be no difference in the latest develop&nbsp;branch, 11.0.0-c83e33. )</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<p style="text-align: justify;">&nbsp;</p>

<div>
<p style="text-align: justify;"><span style="font-size:22px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>CUBRID Storage Management</strong></span></span></p>

<p style="text-align: justify;">&nbsp;</p>
</div>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The CUBRID server has multiple modules that operate and manage data complexly and sophisticatedly. Among them, there are <strong>Disk Manager</strong> and <strong>File Manager</strong> as modules that manage storage. In order to clarify their roles, it is necessary to know the unit the storage space which is managed in CUBRID first.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h5 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Page and Sector</strong></span></span></h5>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Page</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Page is the most basic unit of storage space of CUBRID. A page is a series of consecutive bytes, and the default size is 16KB. When a user creates a volume, it can be set to 8K, 4K, etc. A page is also the basic unit of IO.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Sector</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Sector is a bundle of pages and consists of 64 consecutive pages. When managing storage, it is expensive to perform operations in the units of pages ONLY, so a sector that is larger than page is applied.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h5 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">File and Volume</span></span></h5>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>File</strong></span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A file is a group of sectors reserved for a specific purpose. A page or sector was simply a physical unit for dividing storage space, whereas a file is a logical unit with a specific purpose.&nbsp;</span></span><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">For example, when a user creates a table through the &quot;CREATE TABLE ..&quot; statement, a space is required to store the table. At this time, a type of file, heap file, is created. Analogically, if there is a need to store data, such as creating an index or saving query results, a file suitable for that purpose is created. The file referred to here is distinct from the OS file created through the open() system call in the OS. Unless it is stated specifically in tis article, the word file we mention in this article will be defined as this type of CUBRID file.&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Volume</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A volume is an OS file assigned by the operating system to store data in CUBRID. It refers to the database volume created through utilities such as &quot;cubrid createdb ..&quot;.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Page, Sector, File, and Volume</strong></span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><img src="https://www.cubrid.org/files/attach/images/3826714/801/827/003/4543167da76d6c18cf5d3ecdd65c49e3.png" alt="1.png" style="" /></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When a user creates a database volume, the CUBRID server divides the volume into sectors and pages as mentioned above and groups them into logical units called files and uses them to store data. If you look at the diagram above, you can see that the volume created as an OS file is divided into several sectors, and depending on the purpose, each sector is bundled and used as a heap file, an index file, etc.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Note</strong></span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Here, the volume refers only to the data volume where data is stored, not the log volume.</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Volume, page, and sector are physical units, whereas a file is a logical unit, and if one file continues to grow, it may exist across multiple volumes.</span></span></p>

<h5 style="text-align: justify;">&nbsp;</h5>

<h5 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Disk Manager and File Manager</strong></span></span></h5>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Disk manager and file manager are modules that manage the storage space units. The role of them are stated as follows.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Disk Manager</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Manages the entire volume space. When creating a file, it reserves sectors, and if there are insufficient sectors, it plays a role of securing more sectors from the OS.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>File Manager</strong></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Manage the storage of CUBRID files. When a file requires additional space, it allocates pages among reserved sectors, and when there are no more pages to allocate, it reserves additional sectors from the disk manager.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The following is a schematic diagram of their relationship:&nbsp;</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><img src="https://www.cubrid.org/files/attach/images/3826714/801/827/003/d11b28c14342faed6b559926580bec76.png" alt="2.png" style="" /></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If other modules, such as heap manager and b-tree manager, need space to store data, other modules create files for their purposes and allocate the storage space as needed.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">When the file manager secures space for a file, it always secures it in units of sectors and then allocates them internally in units of pages. When a file can no longer allocate pages because all reserved sectors have been used up, the disk manager reserves the sector. When all the storage space in the volume is used up, the disk manager requests additional space from the OS.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Let&#39;s take a closer look at how each request is handled below.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<p style="text-align: justify;">&nbsp;</p>

<div>
<p style="text-align: justify;"><span style="font-size:22px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>What happens if you run out of space in a file?</strong></span></span></p>
</div>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">What happens if all the allocated space is used in a file? For example, an insert operation is executed in the heap file where the records of the table are stored, but there is no more space.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The answer of this situation is &nbsp;&quot;Allocate additional pages.&quot; To understand the page allocation process, let&#39;s first look at the structure of the file.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">A file secures storage from the disk manager in units of sectors, allocates, and uses it whenever necessary in units of page. To do this, File Manager tracks the allocation of sectors reserved for each file with a <strong>Partial Sector Table</strong> and a <strong>Full Sector Table</strong>.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>&nbsp;Partial Sector Table:</strong> Among reserved sectors, if even one page out of 64 pages of a sector is unallocated, it is registered in this table. Each sector has the following information: (VSID, FILE_ALLOC_BITMAP)</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Full Sector Table:</strong> Among reserved sectors, when all pages in a sector are allocated, it is registered in this table. Each sector has the following information: (VSID)</span></span></li>
</ul>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">VSID is a sector ID, and FILE_ALLOC_BITMAP is a bitmap indicating whether 64 pages in each sector are allocated. These two tables are saved in the file header page, and as the file grows, additional system pages are allocated to store the table.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The page allocation process is simple. By maintaining the reserved sector information in these two tables (actually, maintaining the information in these two tables is rather complicated), if additional pages are required, the page assignment can be completed by selecting one entry from the partial table and turning on one bit of the bitmap. If there is no entry in the partial sector table, pages of all reserved sectors are allocated and used, so additional sectors must be reserved from the disk manager.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Note</strong></span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Page allocation is handled as a System Operation (Top operation). This means that when a page is allocated because additional space is needed during a transaction, the page allocation operation is committed first regardless of the transaction&#39;s commit or abort. This allows other transactions to use the allocated pages before the transaction ends (without cacading rollbacks or other processing), increasing concurrency.</span></span></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">-&nbsp;&nbsp;<!--[if--><!--[endif]-->In addition to the two sector tables, a user page table exists in the file header. This is a table for the Numerable property of a file, and it is omitted because it is beyond the scope of this article.</span></span><!--![endif]--><!--![if--></p>

<p style="margin-left: 40px; text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">-&nbsp; Since the size of a file can theoretically grow infinitely, the size of the sector table must be able to keep growing so that it can be tracked. For this purpose, CUBRID has a data structure called <strong>File Extendible Data</strong> to store a data set of variable size consisting of several pages.</span></span><!--![endif]--><!--![if--></p>

<h4 style="text-align: justify;">&nbsp;</h4>

<h4 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>What if there are no more pages to allocate in a file？</strong></span></span></h4>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">If pages of all reserved sectors are used in a file, additional sectors must be reserved. Before looking at how sector reservations are made, let&#39;s take a look at the structure of the volume. The following is a schematic diagram of the structure of the volume.</span></span></p>

<p style="text-align: justify;"><img src="https://www.cubrid.org/files/attach/images/3826714/801/827/003/63f99d6e24815092f13712cd5c5924b0.png" alt="3.png" style="" /></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The system page includes the volume header, sector table of the volume, and the remaining user pages. The sector table, like the partial sector table of a file, holds a bitmap, whether sectors in the volume are reserved nor not.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">By referring to the page allocation process, you can easily guess the sector reservation process. It checks the bitmap of the sector table and turns on the bit of the unreserved sector. Although this is basically how the process is, the sector reservation should be determined by referring to the sector tables of multiple volumes; and in the process, the disk cache (DISK_CACHE) is performed in two steps as follow for increased efficiency and concurrency.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><img src="https://www.cubrid.org/files/attach/images/3826714/801/827/003/b31d5ae483f0649597678a46b250956c.jpg" alt="4.jpg" style="" /></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Step 1: Pre-Reserve (Change Disk Cache value)</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Step 2: Turn on the reserved bit while traversing the sector tables of the actual volumes based on the decision of the pre-reservation.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">As shown in the figure, if all sectors of the volume itself are exhausted in step 1, the volume is expanded according to the system parameter, and a new volume is added after expanding to the maximum size.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The disk cache has pre-calculated values necessary for reservation based on sector reservation information of all volumes. For example, since the number of available sectors of each volume is based on information in the sector tables, it is possible to determine whether reservation is possible in the current volume or whether the volume needs to be extended directly from the current volume.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h4 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>What if the space is no longer needed?</strong></span></span></h4>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">What if the reserved sectors and allocated pages are no longer needed? Of course, we need to return the space so that other data can be stored. The return process basically turns off the bits in the sector table as opposed to turning them on during the reservation or allocation process and reorganizes the sector tables according to the rules.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The timing of returning the actual space depends on the policy of the module using pages and sectors. For example, in the case of a heap file, the page is not returned immediately even if all data is deleted. In order to return a page of the heap file, it is not when all records in the page are deleted, but it is when the heap manager determines that data is no longer needed according to the operation of MVCC and Vacuum. In addition, in the case of temporary files, the end of the query does not immediately return the space of the temporary files used during the query because the files are recycled for other purposes rather than being removed immediately according to the policy.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Space return is performed by postponing operation (Deferred Database Modification). That is, even if space is returned during a transaction, the return is not processed until the time of commit.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h4 style="text-align: justify;"><strong><span style="font-size:22px;"><span style="font-family:verdana,geneva,sans-serif;">Temporary Purpose Data&nbsp;</span></span></strong></h4>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The foregoing is the case of data for persistent purposes. Data for temporary purposes is handled slightly differently. These differences are briefly summarized here. Before that, let&#39;s first classify the data clearly and talk about the types of volumes. Data can be broadly classified into two categories:</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<ul>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Persistent purpose data:</strong> Permanent purpose data is data that must be permanently preserved and must maintain an intact state even if a failure occurs while the database is running. For example, the heap file that stores table records and the b-tree file that stores indexes are files that store permanent data.</span></span></li>
	<li style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Temporary purpose data:</strong>Temporary purpose data is data that is temporarily stored according to query execution, and all data becomes meaningless when the database is restarted. For example, there are temporary files written to disk due to insufficient memory while storing query results or temporary files created during External Sorting.</span></span></li>
</ul>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">As you can see above, the biggest difference of permanent purpose data and temporary purpose data is whether the data should be kept even when the database is shut down, which, in another word, whether logging for recovery is necessary in CUBRID that follows ARIES. In the case of a permanent file, logging is always performed when data in the permanent file is changed, while in the case of a temporary file, logging is not performed. Additionally, temporary purpose data does not need to be maintained at restart time, which simplifies operations on multiple file operations.</span></span></p>

<h5 style="text-align: justify;">&nbsp;</h5>

<h5 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Temporary purpose data and volumes</strong></span></span></h5>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">There are two types of data volume, permanent and temporary. The diagram below shows which data is stored in which volume according to the purpose of the data.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><img src="https://www.cubrid.org/files/attach/images/3826714/801/827/003/2935d874cfc7f7b38cdcbf2f546f01e8.png" alt="5.png" style="" /></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">In the case of persistent data, it is stored only in the persistent type volume. On the other hand, data for temporary purposes can be stored in both temporary type and permanent type volumes. This is because the user can directly add a volume for temporary data to prevent the OS from creating and formatting a new volume whenever temporary data is saved (cubrid createdb -p temp). When creating a file of temporary purpose data, the user first looks for a persistent purpose volume created, and if there is none, a volume of the temporary type is created. Temporary type volumes are all removed when the database is restarted, and all internal files of temporary type permanent volumes are also destroyed when restarting.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<h5 style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Temporary purpose data and files</strong></span></span></h5>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;Files contain temporary purpose data (hereafter temporary files) are simpler to manage than files contains permanent purpose data. Temporary files are mainly used to temporarily store query results or intermediate results when a large amount of data is accessed during query execution. Since these are files to be removed anyway, the overhead for management can be reduced, and the operation itself must be fast because it is a file that is frequently created/removed in a shorter cycle than a permanent file. The difference is:</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- No logging.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Do not return pages.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Reuse files without destroying them even if they are used up.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">- Use only one type of sector table.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">&nbsp;</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Since it is data that is not needed when restarted, it is basic not to log the data, and even if the data in the page is no longer used, the page is not returned separately.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The file is also not immediately destroyed, but a certain number of temporary files are cached according to the system parameters, and then the temporary files are reused if necessary. Since the temporary file is cleared only when the cache is full, it can be seen that the disk space used for temporary purpose data during the query is not returned immediately after the query is completed.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">The sector table we looked at in the page allocation process of persistent files is to quickly find pages that are not allocated in situations where page allocation and return are repeated, and in the case of temporary files, only one table in the form of a partial sector table is used for temporary files. If all pages within a sector are allocated, they are not moved to the full sector table. It is simply used to track the reserved sectors, and which pages they have reserved within them.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">Other than that, the operation of the disk manager and the file manager described above follows the basic procedure we mentioned above.</span></span></p>

<p style="text-align: justify;">&nbsp;</p>

<hr />
<h4 style="text-align: justify;"><span style="font-size:22px;"><span style="font-family:verdana,geneva,sans-serif;"><strong>Reference</strong>&nbsp;</span></span></h4>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">1<span style="color:#000000;">. CUBRID Manual - </span><a href="https://www.cubrid.org/manual/en/10.2/" target="_blank"><span style="color:#000000;">https://www.cubrid.org/manual/en/10.2/</span></a></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;"><span style="color:#000000;">2. CUBRID Source Code - </span><a href="https://github.com/CUBRID/cubrid" target="_blank"><span style="color:#000000;">https://github.com/CUBRID/cubrid</span></a></span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">3. Mohan, Chandrasekaran, et al. &quot;ARIES: a transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging.&quot; ACM Transactions on Database Systems (TODS) 17.1 (1992): 94-162.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">4. Liskov, Barbara, and Robert Scheifler. &quot;Guardians and actions: Linguistic support for robust, distributed programs.&quot; ACM Transactions on Programming Languages and Systems (TOPLAS) 5.3 (1983): 381-404.</span></span></p>

<p style="text-align: justify;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">5. Silberschatz, Abraham, Henry F. Korth, and Shashank Sudarshan. Database system concepts. Vol. 5. New York: McGraw-Hill, 1997.</span></span></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID's Development Culture: The Development Process and Improvements Behind]]></title>
		<id>https://www.cubrid.org/3827744</id>
		<published>2021-07-16T13:46:29+00:00</published>
		<updated>2021-07-16T13:52:38+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827744"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827744#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by<strong> Hyung-Gyu, Ryoo </strong>on<strong> </strong>07/16/2021</span></span></span></p>

<p> </p>

<h2><span style="font-size:22px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>F</strong><strong>oreword</strong></span></span></span></h2>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Hello, I am Hyung-Gyu Ryoo, I am working in CUBRID as a research engineer in the R&amp;D department. In this post, I would like to introduce the development process of the open source project CUBRID and the efforts we have made to improve the process.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">It has been almost two and a half years since I joined CUBRID.  During this period, as many great fellow developers have joined the CUBRID community, the R&amp;D department of CUBRID has grown from one small team to three developments teams along with a QA team.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">After I participated in the first major version release (CUBRID 11), I was able to look back to the release process and improve the development process with my fellow developers.</span></span></span></p>

<p> </p>

<p> </p>

<p><span style="font-size:22px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>The Development Process of the Open Source Database Project, CUBRID</strong></span></span></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID foundation pursues the values of participation, openness, and sharing. In order to realize the core value of the CUBRID foundation, information sharing and process transparency are embedded in CUBRID’s development process and culture.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">All developers contributing to CUBRID follow the open source project development process. This means that both internal developers of CUBRID and external contributors proceed in the same way. In addition, information created during the development process (function definition, design, source implementation) is naturally shared during the development process.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">All CUBRID projects, feature additions, and bug fixes are completed through the following general open source project development process:</span></span></span></p>

<p> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/2eb00554e6f7e57afad5116cdbb325bb.png" alt="1.png" style="" /></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Communication</strong>: Suggestions and discussions about projects, feature additions, and bug fixes.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Triage:</strong> Just as it is impossible to solve all the problems in the world, it is impossible to develop all the functions required for CUBRID at once, or to find and solve all the bugs perfectly. The project maintainer (development leader) decides which tasks need to be addressed and which tasks to start first.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Dev (Development): </strong>Design, code implementation, and code review are performed by a designated developer.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>QA: </strong>Functional and performance tests are conducted on the implementation results in the CUBRID QA system. </span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The CUBRID development process is based on JIRA and GitHub collaboration tools. JIRA is a collaboration tool that helps you manage software processes. Each task can be managed as a unit called a JIRA issue. GitHub is a service that provides a remote repository for open source projects, and developer can perform code reviews through a function called Pull Request on the web.</span></span></span></p>

<p> </p>

<h3><span style="font-size:20px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">JIRA</span></span></span></h3>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/f9d757d72db8bd3b337692a272936413.png" alt="2.png" style="" /></span></p>

<p style="text-align:center;"><span style="font-family:verdana, geneva, sans-serif;font-size:18px;"><span style="color:#000000;">Example: </span><a href="http://jira.cubrid.org/browse/CBRD-23629" target="_blank"><span style="color:#000000;">http://jira.cubrid.org/browse/CBRD-23629</span></a></span></p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">All CUBRID projects, feature additions, and bug fixes start with the JIRA issue creation. In the development process, the issue will naturally record what kind of work to be done (function definition), how to do it (design), and how the work was completed (detail design/implementation) as shown in the figure above.</span></span></span></p>

<p> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/a12a47e43b0bac137d675076c3d17b46.png" alt="3.png" style="" /></span></p>

<p style="text-align:center;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID Development Process and Jira Issue Status</span></span></span></p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The [Feature Suggestion/Discussion → Selection → Development → Test] process described above for each JIRA issue has the status of the issue as shown in the figure above: OPEN, CONFIRMED, IN PROGRESS, REVIEW IN PROGRESS, REVIEWED, RESOLVED, CLOSED. By looking at the state name, developers can easily understand which stage they are working on.</span></span></span></p>

<p style="text-align:justify;"> </p>

<h3 style="text-align:justify;"><span style="font-size:20px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">Github Code Review</span></span></span></h3>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Code review is a process in which other developers review and give feedback on the code written by the developer in charge of the issue before it is merged in CUBRID. On Github, code reviews are performed using the Pull Request function for the results developed in each issue. By referring to the shared content (feature specification, design) in JIRA, the developers of CUBRID discuss the implementation logic to find a safer and faster way.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/8d823bf375b6f26c04a3d60e3b19544d.png" alt="4.png" style="" /></span></p>

<p style="text-align:center;"> </p>

<p style="text-align:center;"> </p>

<p style="text-align:justify;"><strong><span style="font-size:22px;"><span style="font-family:verdana, geneva, sans-serif;">Development Process Improvement </span></span></strong></p>

<h2 style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Why do we improve the development process?</span></span></span></h2>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">One day at work, instead of taking a short nap after lunch, I had coffee time with my colleagues; and I realize that this short coffee break chat is the most creative time for our fellow developer. For example, while preparing the latest release of the CUBRID 11 version, we talked about the process and the difficulties we met.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">However, during our conversation, I realize that even though all developers worked according to the development process described earlier, the details of each of them were slightly different. Now we have successfully released the stable version of CUBRID 11, however, I feel that something is missing.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Therefore, I started digging into the developing process of CUBRID with my fellow colleagues. We started to think about the reason behind each step and ask each other ‘why’: ‘Why do you have to do this? What does this information you put in each time mean? Is this procedure efficient?’. For these million questions, the answers are mostly ‘there is a lot of ambiguity, and it definitely needs improvement.’</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The development process of CUBRID that I described earlier is a process created by someone in the past (many thanks!). However, I thought that if we do not fully understand why and the purpose of operating the development process, this will not be established as a development culture. Moreover, as time goes by, vague rules were quickly forgotten or were not clearly agreed upon, it seems like only a few members knew about it.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If each element of the development process was not established with a sufficient understanding from all members, it is natural that the details were understood slightly differently by each member. As time pass, this insufficient understanding might drive the valuable development culture apart from the members and become forgetful.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">So, I thought about what values ​​CUBRID should keep as a development culture. And the answer is the three values introduced in the first paragraph of this post: participation, openness, and sharing. When we interpreted from the perspective of CUBRID’s development culture, it can be interpreted as: ‘if we want everyone can easily and safely participate in the CUBRID project, the process must be transparently viewed by anyone, and information must be shared well enough’. I realized that keeping these values ​​well associates with a higher level of development output.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">These contents were shared within the company, and a consensus was formed that a well-established development process would maximize work efficiency beyond simply expressing the convenience of management and mature development culture, and of course, the development process was further improved. In the next chapter, we will look at some of the improvements we have done and how it relates to the value of ‘participation, openness, and sharing.</span></span></span></p>

<p style="text-align:justify;"> </p>

<h2 style="text-align:justify;"><span style="font-size:20px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">Reorganize the JIRA process </span></span></span></h2>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">As explained earlier in the introduction of the CUBRID development process, all CUBRID projects, feature additions, and bug fixes start with the creation of JIRA issues. When creating and managing issues, it is necessary to fill in the items and contents that must be written at each stage of the development process, but users might feel that some of the parts are difficult to understand.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/28fc92709fc1457103ef7d595ec6c077.png" alt="5.png" style="" /></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The above figure is the issue creation window before improving the JIRA process. When contributors create a JIRA project, the default screen is applied and had the following problem:</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">When creating an issue, there are too many items to enter, so contributors don't know which one to fill out (☹)</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Contributors just simply don't know what to write (☹) </span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Due to these problems, the necessary content for each issue task was not consistently written, or as a contributor pondered whether or not to include the content whenever he or she started work, productivity was falling.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Problem 1: </strong><u>When creating an issue, there are too many items to enter, so contributors don't know which one to fill out</u></span></span></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The most frequently asked question by fellow developers who are new to CUBRID when they create an issue for the first time is ‘Huh... Do I have to enter everything here??’ When creating an issue, the project maintainer only needed a few things to sort out the issue; however, all fields were displayed using the default setting of JIRA.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">This situation also raises the threshold for external contributors to participate in CUBRID. If too many fields are displayed at once when an external contributor clicks the ‘Create Issue’ button, he/she might give up contributing after looking around because of the fear of making a mistake.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Therefore, we have organized the necessary contents in each issue’s state and set it to input only the contents that are required when changing to that status.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">It is difficult to explain all the improvements, however, here is an example. the field related to <strong>version</strong> was one of the parts that members were most confused about when creating and managing issues. As shown in red in the figure above, the following three version fields are displayed together during the creation of an issue, so there are cases where a value is entered in only one of them or simply contributors just omit one of the fields because it is not clear where to enter it.</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Affected Version: Version in which the issue creator found a bug or problem during analysis (bug fix type only).</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Planned Version: Version in which the issue is planned to proceed.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Fixed Version: Version with issue results merged.</span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">For each version field, we give a clear meaning and define the different issue status where this value should be entered:</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Affected Version must be entered when creating an issue (OPEN status), </span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Planned Version when the project maintainer selects an issue (CONFIRMED),</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Fixed Version when resolving an issue (RESOLVED)</span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">So, as shown in the following figure, whenever the status of an issue changes, only the necessary items and the version that must be entered are shown at each stage, so contributors can naturally follow the development process without omitting content.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/902e61e988534121deae6d9328bd0424.png" alt="6.png" style="" /></span></p>

<p> </p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Problem 2: <u>Contributors just simply don't know what to write </u></strong></span></span></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">When creating an issue in CUBRID, issue types are assigned according to the task to be performed.</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Correct Error: Issue that fixes bugs or errors.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Improve Function/Performance: Issue that improves existing features or performance.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Development Subject: Issue that adds new features.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Refactoring: Issue that changes unnecessary code clean-up, code structure, and repository separation.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Internal Management: Issue for internal management.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Task: The issue type is applied if there is no category corresponding to the above issue type but is not recommended. (Example of use: release)</span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Depending on the type of issue, the content to be written will vary. For example, in the case of bug fixes, you should write down what kind of bug occurred, how to reproduce the bug, and how it should behave once the bug is fixed. In addition, in case of functional improvement or new function, a detailed description of which function will be added and how to add it (functional specification and design) is required. If you write and share this content well enough, it will be easier for people involved in the project to understand what is merged in the project. And this well-organized and shared functional specification or design also has the advantage of improving the quality of development work results.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">we have organized a content template to write down the must-have content for each issue type:</span></span></span></p>

<p> </p>

<table align="center" border="1" cellpadding="1" cellspacing="1"><thead><tr><th scope="col"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Correct Error</span></span></span></th>
			<th scope="col">
			<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Improve Function/Performance</span></span></span></p>

			<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Development Subject</span></span></span></p>

			<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Refactoring</span></span></span></p>
			</th>
			<th scope="col">
			<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Internal Management</span></span></span></p>

			<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Task</span></span></span></p>
			</th>
		</tr></thead><tbody><tr><td>
			<ul><li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Description: </strong><b>: i</b>ssue description</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Test Build:</strong> build version</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Repro: </strong>the procedure to reproduce the bug</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Expected Result:</strong> Expected results (expected results to be fixed)</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Actual Result:</strong> Current results (problematic results)</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Additional Information: </strong>If there is any additional material or content that can be helpful to understand the bug</span></span></span></p>
				</li>
			</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;"><strong> Example)</strong> </span><a href="http://jira.cubrid.org/browse/CBRD-23903" target="_blank"><span style="color:#000000;"><strong>CBRD-23903</strong></span></a></span></span></p>
			</td>
			<td>
			<ul><li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Description:</strong> <b>i</b>ssue description</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Specification Changes:</strong>Organize and write the specifications to be changed</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Implementation:</strong> 자</span></span></span></p>
				</li>
				<li><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Create design specifications, implementation concepts, and details to address issues.</span></span></span></li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Acceptance Criteria: </strong>Define behaviours/results that must be satisfied within the scope of the issue you have chosen while conducting design and implementation according to your requirements</span></span></span></p>
				</li>
				<li>
				<p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Definition of done:</strong> Write down the criteria for the completion of the issue.</span></span></span></p>
				</li>
			</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;"><strong>Example)</strong> </span><a href="http://jira.cubrid.org/browse/CBRD-23894" target="_blank"><span style="color:#000000;"><strong>CBRD-23894</strong></span></a></span></span></p>
			</td>
			<td><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Description:</strong> The purpose and description of the work.</span></span></span></td>
		</tr></tbody></table><p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">These contents will greatly help to improve the code review process, which will be discussed in the next chapter. This is because it is difficult to grasp all the contexts with only code changes as CUBRID is a system in which several functions and modules are intricately intertwined.</span></span></span></p>

<p style="text-align:justify;"> </p>

<h2 style="text-align:justify;"><span style="font-size:20px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Improve Github code review/ code merge</strong></span></span></span></h2>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">One of the most important goals in the development process is how to conduct good code reviews. Here are some of the benefits of code review: [3]</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Better code quality: improve internal code quality and maintainability (readability, uniformity, understandability, etc.)</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Finding defects: improve quality regarding external aspects, especially correctness, but also find performance problems, security vulnerabilities, injected malware, ...</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Learning/Knowledge transfer: help in transferring knowledge about the codebase, solution approaches, expectations regarding quality, etc.; both to the reviewers as well as to the author</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Increase sense of mutual responsibility: increase a sense of collective code ownership and solidarity</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Finding better solutions: generate ideas for new and better solutions and ideas that transcend the specific code at hand. </span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">All the members know these advantages, but to what extent should the reviewer review the code? Also, does the author really need this level of review? It can become a bit of an obligatory review while thinking about it.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">So, in order to induce a more effective/efficient code review, it was necessary to think about how to do a good code review and improve it. Reading code is a task that requires a high level of concentration. Therefore, reviewers should be able to give high-level thought and feedback in a short period of time.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Now let’s take a look at the content that has been introduced for better code review in CUBRID.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><b>Automation Tool (CI)</b></span></span></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Automation tools are introduced to avoid wasting reviewers' mental efforts in areas that are boring, and where computers can do better. For example, a code style, license fixes, or a frequent mistake (such as not initializing a variable, or leaving unnecessary code, etc.).</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In order to speed up the efficiency of code review, CUBRID introduces the following automation tools:</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Build</strong>: build each environment (CentOS, Ubuntu, Windows) for the code you want to merge and show the result (success or failure).</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>SQL test automation</strong>: Build the source and actually run several SQL syntaxes to ensure that the functionality of the database works correctly.</span></span></span></li>
</ul><p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">Reference: </span><a href="https://app.circleci.com/pipelines/github/CUBRID" target="_blank"><span style="color:#000000;">https://app.circleci.com/pipelines/github/CUBRID</span></a></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">These automation tools helped make the code more stable. However, it is not enough to help reviewers focus on the logic of the code to merge or how well the code meets the design. This is because reviewers are likely to be buried during review time due to easy and visible problems such as simple mistakes and code formatting.</span></span></span></p>

<p> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/c8dd7ec17fa6d1f890fac8fc139154d9.png" alt="7.png" style="" /></span></p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Therefore, in Pull Request, these low-level reviews were improved using automated tools so that reviewers can focus on high-level reviews only.</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- license: </strong>Make sure you have the correct form of the license header comments.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- Pull Request Style:</strong> There is a rule that all PRs must be associated with each JIRA issue, and this issue number must be specified at the beginning of the PR title. pr-style will check this and fail if the rule is not followed.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- code-style:</strong> Make sure you follow the defined code style to keep your code consistent. Code style is defined using code formatting tools, and code-style uses these tools to check and correct whether the rules are properly followed. If it is different from the rule, it will fail and report it through PR suggestion. </span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- cppcheck: </strong>cppcheck is a static analysis tool for the C++ language. Static analysis can reveal many problems that developers can cause, such as unused variables and NULL references. These errors are easy to make, but they are obvious, so you can only find them by looking at the code without context. Therefore, it is inefficient for reviewers to find and comment on each one. cppcheck catches these problems. If there is an error, it will fail and report using a comment to the PR. </span></span></span></li>
</ul><p><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">​</span></span></span></p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/7dcc24e1b54eb986b905ebfa34add619.png" alt="8.png" style="" /></span></p>

<p> </p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">The newly introduced automation tool used GitHub Actions (</span><a href="https://docs.github.com/en/actions" target="_blank"><span style="color:#000000;">https://docs.github.com/en/actions</span></a><span style="color:#000000;">), a CI tool directly provided by GitHub. The introduction of this tool makes it easier for contributors to CUBRID to understand and engage with CUBRID's code conventions and the quality of the code they are trying to reach. If the code doesn't pass the automation tool, the code won’t be merged; therefore, you don't have to worry about making a mistake.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Divining a large amount of code review </strong></span></span></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Because CUBRID is a database system with a complexity of features and modules, the amount of code requested for review is often huge. One Pull Request with too many code changes makes it impossible for reviewers to review effectively.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/66134082cd102692591cd24cf0663ff6.gif" alt="9.gif" style="" /></span></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">As the number of lines of code (LOC) exceeds 400 lines, the code defect detection density decreases. [4]</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In CUBRID, we try to conduct code reviews in small, meaningful units of features by creating feature branches to avoid Pull Requests with too many changes. For a detailed description of feature branches, refer to [5].</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><strong><span style="font-size:22px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">The Development Process Document: CUBRID Contribution Guide </span></span></span></strong></p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">To make it a little easier to participate in the development of CUBRID, we needed a way to explain how the development process goes as a whole and share the essentials at each stage. So, we wrote an explanatory guideline document that can be used as a reference for developers who are interested in and want to contribute, as well as the new developers who are joining CUBRID.</span></span></span></p>

<p style="text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><a href="https://dev.cubrid.org/dev-guide/v/en/" target="_blank"><span style="color:#000000;">https://dev.cubrid.org/dev-guide/v/en/</span></a></span></span></p>

<p> </p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/76e023f79e18b61c47bb60ea167f38f0.png" alt="10.png" style="" /></span></p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;font-size:18px;">Some of the things we considered while writing this guideline document are:</span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Do not write something that is difficult to read! The development process is a step-by-step process, so let’s make it possible for readers to find the information for each step easily. </span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Everyone can read the latest version.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">There is no perfectly thorough development process or guide documentation, the documentation should be easy and understandable. </span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">I have thought about several tools and services, such as Word, Jira Wiki, Google Docs, creating a new webpage, Gitbook pages, etc. After several considerations, I decided to go with the Gitbook service (Thank you for Gitbook Team!)</span></span></span></p>

<ul><li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">By displaying the document structure in tab format, readers can easily view each paragraph.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">It is distributed as a web page and if we modified and merged in real-time, readers can see the modifications in real-time.</span></span></span></li>
	<li style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Of course, support Open Source Community Plan for open source projects! </span></span></span></li>
</ul><p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If you want to write a contribution guide document for another open source project, you are always welcome to refer to it when you are thinking about how to distribute the document and tools!</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<h2 style="text-align:justify;"><span style="font-size:22px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Last but not least... the CUBRID development culture</strong></span></span></span></h2>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Many developers, of course, want to work in a good development culture. However, I don't think there is any development organization in the world with a perfect development culture. The development process described above is a means to create a 'development culture', and the more verification processes are added to the development process, the lower the productivity of course. Also, as time passes and circumstances change, the improved process may not work properly.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID continues to search for a  balance between better quality results and higher productivity. In CUBRID, Members gather to share and discuss the best way to conduct code reviews, such as the following, so that all members can become more natural in the development culture of CUBRID.</span></span></span></p>

<ul><li style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">- How to Do Code Review Like a Human (</span><a href="https://mtlynch.io/human-code-reviews-1/" target="_blank"><span style="color:#000000;">part 1</span></a><span style="color:#000000;">, </span><a href="https://mtlynch.io/human-code-reviews-2/" target="_blank"><span style="color:#000000;">part 2</span></a><span style="color:#000000;">)</span></span></span></li>
</ul><p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">​</span></span></span></p>

<p style="text-align:center;"><span style="color:#000000;"><img src="https://www.cubrid.org/files/attach/images/3826714/744/827/003/4409955b7765274546ac8d1e1a2f715e.jpg" alt="11-min.jpg" style="" /></span></p>

<p> </p>

<p> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Based on CUBRID’s organizational culture that values horizontal and free communication and knowledge sharing, many people are able to actively join and help to improve the development process.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">(Special Thanks to CTO, Jaeeun, Kim and Jooho,Kim the research engineers!!).</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">I hope that this article will be an opportunity to introduce the way CUBRID's development organization works and to understand the CUBRID development culture.</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Thank you. :-)</span></span></span></p>

<p style="text-align:justify;"> </p>

<p style="text-align:justify;"> </p>

<h2 style="text-align:justify;"><span style="font-size:22px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Reference</strong></span></span></span></h2>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">[1] Open source Guide, </span><a href="https://opensource.guide/"><span style="color:#000000;">https://opensource.guide/</span></a></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">[2] Software Policy &amp; Research Institute, </span><a href="https://spri.kr/posts/view/19821?page=2&amp;code=column" target="_blank"><span style="color:#000000;">https://spri.kr/posts/view/19821?page=2&amp;code=column</span></a></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">[3] Code Review, Wikipedia, </span><a href="https://en.wikipedia.org/wiki/Code_review" target="_blank"><span style="color:#000000;">https://en.wikipedia.org/wiki/Code_review</span></a></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">[4] Best Practices for Code Review, </span><a href="https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/" target="_blank"><span style="color:#000000;">https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/</span></a></span></span></p>

<p style="text-align:justify;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">[5] Feature branch workflow, </span><a href="https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow" target="_blank"><span style="color:#000000;">https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow</span></a></span></span></p>

<p style="text-align:justify;"> </p>

<p> </p>

<p> </p>

<p> </p>

<p><span style="color:#000000;">  </span></p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[TDE (Transparent Data Encryption) in CUBRID 11]]></title>
		<id>https://www.cubrid.org/3827724</id>
		<published>2021-07-07T13:28:12+00:00</published>
		<updated>2021-07-07T13:49:46+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827724"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827724#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Written by<strong> Jiwon Kim </strong>on<strong> </strong>07/07/2021</span></span></p>

<h2><span style="color:#800000;"><span style="font-size:24px;"><em><span style="font-family:'lucida sans unicode', 'lucida grande', sans-serif;"><strong>👍</strong></span></em></span></span><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Increase the level of database security by utilizing various security features of CUBRID.</span></span></h2>


<h2><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:22px;">CUBRID 11 has enhanced security by providing the Transparent Data Encryption (henceforth, TDE) feature. S</span><span style="font-size:22px;">o, what is TDE?</span></span></h2>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#696969;">TDE means transparently encrypting data from the user’s point of view. This allows users to encrypt data stored on disk with little to no application change.</span></span></span></p>

<p><br /><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#696969;">When a hacker hacks into an organization, the number one thing they want to steal is the important data in the database. Alternatively, there may be a situation where an employee with malicious intention inside the company logs into the database and moves all data to a storage media such as a USB. </span><br /><br /><span style="color:#696969;">The easiest way to protect data in these situations is to encrypt the database. TDE, a technology that encrypts the database file itself among encryption technologies, would be a decent choice for you to protect your data. An encrypted database cannot be accessed without a key, so if you don't have the key file with you, the stolen file will be a useless dummy file.</span></span></span></p>

<p> </p>

<p><strong><span style="font-size:24px;"><span style="font-family:verdana, geneva, sans-serif;">The TDE feature uses symmetric key algorithms.</span></span></strong></p>

<p><span style="color:#696969;"><span style="font-family:verdana, geneva, sans-serif;"> <span style="font-size:16px;">👉</span></span></span><span style="font-size:16px;"><span style="font-family:verdana, geneva, sans-serif;">Symmetric key technique: A technique that encrypts and decrypts data with the same key.</span></span></p>

<p> </p>

<div bg_color="f6f6f6" bold="N" border_color="e4e4e4" border_style="left_solid" border_thickness="5" color="blue" editor_component="quotation" folder_closer="닫기" folder_opener="더 보기..." margin="20" padding="20" style="margin:5px;padding:5px;background-color:#fafafa;border-left:5px solid #eeeeee;" use_folder="N">
<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">There are two types of symmetric key encryption algorithms provided by CUBRID: AES and ARIA.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#696969;">  - </span>AES: Encryption algorithm established by the National Institute of Standards and Technology (NIST)</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#696969;">  - </span>ARIA: Standard encryption algorithm adopted by Korea Internet &amp; Security Agency (KISA)  </span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Keys used for encryption are managed in two levels consisting of master keys and data keys for efficiency. Master keys managed by the user are stored in a separate file, and CUBRID provides a utility to manage it.</span></span></p>


<span style="font-size:14px;"><span style="color:#696969;"><span style="font-family:'lucida sans unicode', 'lucida grande', sans-serif;">⛔</span></span></span><span style="font-size:16px;"><span style="font-family:verdana, geneva, sans-serif;">If you want to avoid the situation where all the data is moved to a storage media such as USB, it is recommended to save the master key file in a separate location (refer to the settings below).</span></span>

<p style="margin-left:200px;"><img src="https://www.cubrid.com/files/attach/images/7900/124/832/003/089464df73dea8342206ce60c3454b39.jpg" alt="image1.jpg" style="height:373px;width:650px;" /></p>


<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Master key: A key used when encrypting and decrypting data keys, and it is managed by DBA user.</span></span></li>
</ul><ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Data Key: A key used when encrypting user data such as table and log, and it is managed by CUBRID Engine.</span></span></li>
</ul>
 

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Managing keys in two levels makes it possible to perform the key change operation efficiently. If there is only a key that encrypts the user data, it takes a long time to work when you change the key. All the data that has been encrypted has to be read, decrypted, and re-encrypted. Also, the overall performance of the database may be degraded during this process.<span style="color:#696969;"> </span></span></span></p>


<p> </p>

<p><strong><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:24px;">What does CUBRID's TDE encrypt/decrypt?</span></span></strong></p>

<span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In CURBID, the table is set as an encryption target, and the following files are encrypted accordingly.</span></span> 

<span style="color:#696969;"><span style="font-size:16px;"><em>👉</em></span></span><span style="font-family:verdana, geneva, sans-serif;">In CUBRID, a table is a unit for TDE-encryption. To use the TDE feature, create a table using the ENCRYPT option as follows:</span><span style="color:#696969;"><span style="font-size:14px;"><em> </em></span></span>

<span style="color:#696969;"><span style="font-size:14px;"><span style="font-family:'courier new', courier, monospace;">CREATE TABLE tbl_tde (x INT PRIMARY KEY, y VARCHAR(20)) ENCRYPT=AES || ENCRYPT=ARIA;</span></span></span>

<p> </p>

<p style="margin-left:160px;"><img src="https://www.cubrid.com/files/attach/images/7900/124/832/003/c87c051b45776b21514353c1d815405a.jpg" alt="image2.jpg" style="height:219px;width:750px;" /></p>


<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Encryption Target:</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">1. Permanent/temporary data volume</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - The encrypted table data and all index data created on the table are encrypted</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - Temporary data created during queries related to encrypted tables are also encrypted.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">2. Transaction log</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - Encrypt all log data related to the encrypted tables.</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - Encryption is applied to both the active log and the archive log.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">3. Backup volume</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - If there are encrypted data in data volumes and log volumes, they are also stored as encrypted in backup volumes.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">4. DWB (Double Write Buffer)</span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">   - Persistent data is temporarily written to the Double Write Buffer (DWB) before being written to the data volume. It may be encrypted even at this time because the data for the encrypted table can be included.</span></span></p>


<p> </p>

<p><strong><span style="font-size:24px;"><span style="font-family:verdana, geneva, sans-serif;">Precautions when using TDE</span></span></strong></p>

<span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>1. Key file:</strong> </span></span></span><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">By default, the key file is created with the name of &lt;database-name&gt;_keys at the location where the data volume is created when creating a database using cubrid createdb utility.</span></span></span>


<p><span style="color:#696969;"><span style="font-family:'courier new', courier, monospace;">$ <strong>cubrid createdb testdb ko_KR.utf8</strong><br />
Creating database with 512.0M size using locale ko_KR.utf8. The total amount of disk space needed is 1.5G.</span></span></p>

<p><span style="color:#696969;"><span style="font-family:'courier new', courier, monospace;">CUBRID 11.0</span></span><br />
 </p>

<p><span style="color:#696969;"><span style="font-family:'courier new', courier, monospace;">$ ll<br />
total 1050348<br />
drwxrwxr-x. 2 cubrid11 cubrid11         6  april 30 16:01 lob<br />
-rw-------. 1 cubrid11 cubrid11 536870912  april 30 16:01 testdb<br />
-rw-------. 1 cubrid11 cubrid11        65  april 30 16:01 <strong>testdb_keys</strong><br />
-rw-------. 1 cubrid11 cubrid11 536870912  april 30 16:01 testdb_lgar_t<br />
-rw-------. 1 cubrid11 cubrid11 536870912  april 30 16:01 testdb_lgat<br />
-rw-------. 1 cubrid11 cubrid11       214  april 30 16:01 testdb_lginf<br />
-rw-------. 1 cubrid11 cubrid11       278  april 30 16:01 testdb_vinf</span></span></p>


<span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;"><strong>2. </strong><strong style="font-family:Raleway, 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;"><strong>TD</strong>E-related settings (refer to cubrid.conf)</strong></span></span></span>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;"><strong>  -  ​tde_keys_file_path</strong></span></span></span></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">Set the path to the key file.</span></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">The name of the key file is fixed as [database_name]_keys , and it specifies the directory where the key file exists.</span></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">If this value is not set, locate the key file in the same location as the database volume.</span></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">When changing the key file path, this setting value is not dynamically changed, so the service must be restarted. At this time, if you move only the key file and do not modify the path of the key file, an error stating that the TDE module could not be loaded occurs when accessing the encryption table (DDL, DML). </span></span></span></li>
</ul><p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;"><strong>  -  tde_default_algorithm</strong></span></span></span></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">Specify the default encryption algorithm. (If the algorithm is not specified when creating the TDE encryption table, AES is used by default)</span></span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">This default encryption algorithm is used to encrypt logs or temporary data in addition to tables.</span></span></span></li>
</ul>


<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>3. Situation when the key file is deleted:</strong></span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If the database is running, there is no problem with the service even if the master key file is deleted because the contents of the master key are loaded into memory, and service is provided. However, this can be problematic as it re-reads the settings when restarted.</span></span></p>

<p> </p>


<p style="margin:20px;padding:5px;background-color:rgb(250,247,238);border-left:5px solid rgb(241,238,229);"><span style="color:#696969;"><span style="font-family:'courier new', courier, monospace;"><span style="font-size:14px;"><code>csql&gt; SELECT * FROM tbl_tde;<br /><br />
In the command from line 1, </code></span><br /><br /><span style="font-size:14px;"><code><strong>ERROR: TDE Module is not loaded.</strong></code></span></span></span></p>

<span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>4. </strong><strong style="font-family:Raleway, 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;"><strong>P</strong>oints to note when using TDE</strong></span></span></span>

<p style="margin-left:40px;"><br /><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>* HA Environment </strong></span></span></span></p>

<p><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">In a HA environment, TDE is applied independently to each node (master/slave/replica). This means that for each node, the key file and TDE-related system parameters can be managed independently.</span></span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">However, since encrypted data is replicated between master/slave, if the TDE module of the slave node is not loaded, the replication will stop when attempting to manipulate an encrypted table from the master node. In this case, not only the changes to a TDE-encrypted table but also any subsequent changes cannot be replicated. Therefore, the settings or key files should remain the same.</span></span></span></p>

<p style="margin-left:80px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;"><strong>* TDE on backup </strong></span></span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">1.</span></span></span><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Backup Key File </span></span></span></p>

<p style="margin-left:80px;"><span style="color:#696969;"><span style="font-size:14px;"><span style="font-family:'courier new', courier, monospace;">$ **cubrid backupdb <strong>--separate-keys</strong> -D . testdb@localhost**<br />
Backup Volume Label: Level: 0, Unit: 0, Database testdb, Backup Time: Wed May  5 23:18:38 2021<br /><br />
$ ll<br />
-rw-------. 1 cubrid11 cubrid11         65  May  5 23:18 <strong>testdb_bk0_keys</strong><br />
-rw-------. 1 cubrid11 cubrid11 1614820352  May  5 23:18 testdb_bk0v000</span></span></span></p>

<p style="margin-left:80px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="color:#000000;"><span style="font-family:verdana, geneva, sans-serif;">The backup volume contains the key file by default, which can be backed up by separating the keys with the --separate-keys option. The separated backup key file is created in the same directory path as the backup volume and has the name &lt;database_name&gt;_bk&lt;backup_level&gt;_keys. However, in the case of separating the key file, it must be managed carefully to prevent losing the key file for database restore.</span></span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">2. </span></span></span><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">A key file is required for backup and recovery, and the key file is found in the following order.</span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The priority of the key file to use for restoring:</span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">1. The backup key file that the backup volume contains.</span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">2. The backup key file created with the \-\-separate-keys option during backup (e.g. testdb_bk0_keys). This key file must exist in the same path as the backup volume.</span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">3. The server key file in the path specified by the tde-keys-file-path system parameter.</span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">4. The server key file in the same path as the data volume (e.g., testdb_keys). </span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">You can specify the key file to be used for recovery through the --keys-file-path option, and an error will occur if the key file does not exist in the path.</span></span></p>

<p style="margin-left:40px;"> </p>

<div bg_color="fafaee" bold="N" border_color="b3b3aa" border_style="left_solid" border_thickness="1" color="blue" editor_component="quotation" folder_closer="닫기" folder_opener="더 보기..." margin="5" padding="5" style="margin:5px 5px 5px 80px;padding:5px;background-color:rgb(250,250,238);border-left:1px solid rgb(179,179,170);" use_folder="N">
<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Key file classification:</span></span></p>

<ul><li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Server key file:</strong> A key file that is generally used when running the server. It can be set with the tde_keys_file_path system parameter or in the default path same as the data volume.</span></span></li>
	<li><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong style="font-family:Raleway, 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;">Backup key file:</strong> A key file created during backup included in the backup volume or separated by \-\-separate-keys option.</span></span></li>
</ul>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="color:#000000;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">3. Even if the correct key file is not found, the recovery can be successful if there is no encrypted data on the backup volume.  However, since the key file does not exist, subsequent TDE functions cannot be used.</span></span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:#000000;">4. Basically, if you lose your backup key file, you cannot perform backup recovery. However, if the key has not been changed, recovery is possible by specifying the backup key file of the old volume with the --keys-file-path option. Also, if the backup key of the old volume exists in the default path, it can be used to restore the backup</span>.</span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">5. When performing restoration using multiple level backup volumes by incremental backup, the backup key file of the level specified by the \-\-level option is used. If the \-\-level option is not specified, the highest level backup key file is used. If only the key file to be used exists, restore can succeed.</span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><span style="color:#696969;">* </span>When TDE is unavailable</strong></span></span></p>

<p style="margin-left:40px;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the following cases, the TDE feature cannot be used, and an error occurs because the TDE module cannot be loaded correctly.</span></span></p>

<p style="margin-left:40px;"><span style="color:#696969;"><span style="font-size:16px;"><span style="font-family:'courier new', courier, monospace;">⛔ ERROR: TDE Module is not loaded.</span></span></span></p>

<ul style="margin-left:40px;"><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">When the valid key file cannot be found</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">When the key set on the database cannot be found in the key file</span></span></li>
</ul><p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Even if the TDE module is not loaded, the server can start normally, and users can access unencrypted tables.</span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">However, the case log data that has been encrypted is different. If the log data is encrypted when the TDE module is not loaded and the log is accessed by recovery, HA, VACUUM, etc., the system cannot be properly executed, and the entire server has no option but to stop running the server.</span></span></p>

<p style="margin-left:40px;"> </p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><span style="color:#696969;">* </span></strong><b>TDE Restrictions</b></span></span></p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">In addition to the restrictions described above, there are the following:</span></span></p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">1. The replication log is not encrypted in HA.</span></span></p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">2. CUBRID does not support the ALTER TABLE statement to change the TDE table option, which means you cannot set TDE to existing tables. If you want to do that, you need to move the data to the new table created with the TDE table option.</span></span></p>

<p style="margin-left:40px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">3. SQL log is not encrypted.</span></span></p>
</div>

<p> </p>

<p> </p>

<hr /><p><strong><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:24px;"> What other security features does CUBRID support?</span></span></strong></p>


<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><span style="color:#696969;">SSL</span></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">To prevent sniffing, the act of someone intercepting data in transit over the Internet, CUBRID provides packet encryption.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">For the data to be transmitted, the packet is encrypted and transmitted, and the SSL/TLS protocol is used to encrypt this packet.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">More details can be found in the previous blog: <a href="https://www.cubrid.org/manual/en/11.0/security.html#packet-encryption">Packet encryption</a>. </span></span></li>
</ul><p><br /><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><span style="color:#696969;">ACL</span></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">A function called access control is used to restrict the list of unauthorized IPs and DB users from accessing the corresponding broker or database server. You can protect the database from problems caused by incorrect external access.</span></span></li>
</ul><p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><span style="color:#696969;">Audit Log</span></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">For auditing the developer's or user's DDL log, CUBRID provides the DDL Audit Log.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">DDLs issued through CAS, csql, and loaddb could be recorded in log files in addition to the copy of the files executed if required.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">When the system parameter ddl_audit_log is set to yes, the DDL audit log is created in the $CUBRID/log/ddl_audit directory.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">DDL execution start time, client IP address, user name, etc. are recorded in the file. </span></span></li>
</ul><p><br /><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><span style="color:#696969;">G</span><span style="color:#696969;">RANT/REVOKE /owner</span></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The smallest unit of authorization in CUBRID is a table. You can allow or restrict other users (groups) access to the tables you create by using the GRANT/REVOKE statements appropriately.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">All users have the privileges granted to the PUBLIC user. That is, every user in the database becomes a member of PUBLIC.</span></span></li>
	<li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">A database administrator (DBA) or member of the DBA group can use the ALTER ... OWNER statement to change the owner of a table, view, trigger, Java stored function/procedure. </span></span></li>
</ul><p><img alt="715b51d85bbf03b2b2caf1af645e94a8.png" data-file-srl="3827725" editor_component="image_link" src="https://www.cubrid.org/files/attach/images/3826714/724/827/003/5c7a7a9bf6e45be6a74b3ee1dd8a6f66.png" /></p>

<div bg_color="fafaee" bold="N" border_color="bebcb5" border_style="left_solid" border_thickness="1" color="blue" editor_component="quotation" folder_closer="닫기" folder_opener="더 보기..." margin="5" padding="5" style="margin:5px;padding:5px;background-color:#fafaee;border-left:1px solid #bebcb5;" use_folder="N"><span style="font-size:16px;">👉<span style="font-family:verdana, geneva, sans-serif;">change the owner</span><span style="font-family:'courier new', courier, monospace;"><span style="font-family:verdana, geneva, sans-serif;">:</span> ALTER TABLE tbl1 OWNER TO user1;</span></span>
</div>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">For detailed documentation about CUBRID Security, refer to: </span></span></p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><a href="https://www.cubrid.org/manual/en/11.0/security.html#">CUBRID Security - CUBRID 11.0 documentation</a>.</span></span></p>
</div></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[Preventing Sniffing by CUBRID- Packet Encryption]]></title>
		<id>https://www.cubrid.org/3827663</id>
		<published>2021-05-11T10:50:59+00:00</published>
		<updated>2021-05-21T14:25:28+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3827663"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3827663#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by<strong> Youngjin Hwang </strong>on<strong> </strong>05/11/2021</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Nowadays, browsing the internet with PCs or our smartphones has become an essential part of our daily life. As a result, it is possible to peek into the data being transmitted over the Internet with malicious intent. In other words, being able to peek at the data being transmitted by someone is called sniffing.</span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">A classic example of a sniffing attack would be intercepting the account’s id and password and causing physical damage by using the personal information of others.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/7d59878e0af6f6a4b89e185b0f630b45.png" alt="Third Party (1).png" style="" /></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">To protect our database user data, CUBRID 11.0 has enhanced security by providing packet encryption (and TDE (Transparent Data Encryption) based data encryption, but that will be cover in another blog later). When packet encryption is applied, the packet is encrypted and transmitted for the data to be transmitted, making the data uninterpretable even if someone sniffs it.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><u>CUBRID PACKET ENCRYPTION</u></strong></span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">CUBRID uses SSL/TLS protocol to encrypt data transmitted between the client and server. SSL encrypts data sent and received using a symmetric key, in another word, the client and server share the same session key to decrypt.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Whenever a client connects to the server, an asymmetric encryption algorithm is used to exchange information required to generate a newly created session key in an encrypted form. For this purpose, the server's public key and private key are required.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The public key used by the server is included in the certificate ‘cas_ssl_cert.crt’, and the private key is included in ‘cas_ssl_cert.key’. The certificate and private key are located in the $CUBRID/conf directory. This certificate was created using OpenSSL's command tool and is a ‘self-signed’ certificate.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">This certificate, ‘self-signed’ certificate, was created with the OpenSSL command tool utility and can be replaced with another certificate issued by a public CA (Certificate Authorities, for example, IdenTrust or DigiCert) if desired. Or existing certificate/private key can be replaced by generating a new one using the OpenSSL command utility.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Below is an example of creating a private key and certificate using the OpenSSL command tool.</span></span></p>

<p> </p>

<div class="colorscripter-code" style="color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;">
<table cellpadding="0" cellspacing="0" class="colorscripter-code-table" style="margin:0;padding:0;border:none;background-color:#272727;"><tbody><tr><td style="padding:6px 0;text-align:left;">
			<div style="margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;line-height:130%;">
			<div style="padding:0 6px;line-height:130%;"><span style="color:#999999;"># create 2048 bit size RSA private key</span></div>

			<div style="padding:0 6px;line-height:130%;">$ openssl genrsa <span style="color:#ff3399;">-</span>out my_cert.key <span style="color:#c10aff;">2048</span></div>

			<div style="padding:0 6px;line-height:130%;"> </div>

			<div style="padding:0 6px;line-height:130%;"><span style="color:#999999;"># create CSR (Certificate Signing Request)</span></div>

			<div style="padding:0 6px;line-height:130%;">$ openssl req <span style="color:#ff3399;">-</span>new <span style="color:#ff3399;">-</span>key my_cert.key <span style="color:#ff3399;">-</span>out my_cert.csr</div>

			<div style="padding:0 6px;line-height:130%;"> </div>

			<div style="padding:0 6px;line-height:130%;"><span style="color:#999999;"># create a certificate valid for 1 year.</span></div>

			<div style="padding:0 6px;line-height:130%;">$ openssl x509 <span style="color:#ff3399;">-</span>req <span style="color:#ff3399;">-</span>days <span style="color:#c10aff;">365</span> <span style="color:#ff3399;">-</span>in my_cert.csr <span style="color:#ff3399;">-</span>signkey my_cert.key <span style="color:#ff3399;">-</span>out my_cert.crt </div>
			</div>
			</td>
			<td style="vertical-align:bottom;padding:0 2px 4px 0;"><a href="http://colorscripter.com/info#e" style="text-decoration:none;color:#FFFFFF;" target="_blank"><span style="font-size:9px;background-color:#4f4f4f;color:#FFFFFF;padding:1px;">cs</span></a></td>
		</tr></tbody></table></div>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">And replace my_cert.key and my_cert.crt with $CUBRID/conf/cas_ssl_cert.key and $CUBRID/conf/cas_ssl_cert.crt respectively.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">(The self-signed certificate example written above is a certificate that is valid for one year and must be renewed every year. If you do not want to renew every year, since the self-signed certificate does not need to be renewed every year if you increase the validity period, you can change the validity period of the self-signed certificate. You can increase it or use it instead of a certificate issued by an accredited certification authority.)</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><u>CUBRID PACKET ENCRYPTION METHOD</u></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Supported drivers:</span></span></li>
</ul><p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">CUBRID provides various drivers, but the drivers that support packet encryption connections are JDBC and CCI drivers.</span></span></p>

<p> </p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Server setting:</span></span></li>
</ul><p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">CUBRID can set the encryption mode and non-encryption mode on a per broker basis. The default is the non-encryption mode, and you can set the encryption mode by changing the SSL parameter value of cubrid_broker.conf in the configuration file to ON as shown in the figure below.</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/eb8f2812a84cc1e0b3b6628eec62bd01.png" alt="d4f93c1d44ebe1e58fb70a424ec5a31d.png" style="" /></span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The client (AP application) can make an encrypted connection using the useSSL property of db-url. Clients can connect to SSL by simply adding the useSSL property as shown in the example below.</span></span></p>

<p> </p>

<div class="colorscripter-code" style="color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;">
<table cellpadding="0" cellspacing="0" class="colorscripter-code-table" style="margin:0;padding:0;border:none;background-color:#272727;"><tbody><tr><td style="padding:6px 0;text-align:left;">
			<div style="margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;line-height:130%;">
			<div style="padding:0 6px;line-height:130%;">JDBC driver : <span style="color:#FFFFFF;">"jdbc:cubrid:localhost:33000:demodb:::?charset=utf-8&amp;</span><span style="color:#FFD700;">useSSL=true</span><span style="color:#FFFFFF;">","UserId",""</span></div>

			<div style="padding:0 6px;line-height:130%;">CCI driver  : <span style="color:#FFFFFF;">cci:cubrid:localhost:33000:demodb:::?</span><span style="color:#FFD700;">useSSL=true</span></div>
			</div>
			</td>
			<td style="vertical-align:bottom;padding:0 2px 4px 0;"><a href="http://colorscripter.com/info#e" style="text-decoration:none;color:#FFFFFF;" target="_blank"><span style="color:#FFFFFF;"><span style="font-size:9px;background-color:rgb(79,79,79);padding:1px;">cs</span></span></a></td>
		</tr></tbody></table></div>

<p> </p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">CUBRID Manager:</span></span></li>
</ul><p><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/4f3c0c70518aa056b3359b353e5c986b.jpg" alt="KakaoTalk_20210507_132316654.jpg" style="" /></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">If the broker is used without setting the useSSL property while operating in encryption mode, the following error will be displayed. This means that the client you are trying to connect to and the broker encryption mode must match (both in encrypted mode or both in non-encrypted mode).</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The requested SSL mode is not permitted, the CAS server is running in a different mode (check useSSL property).</span></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><u>BEFORE/AFTER APPLYING PACKET ENCRYPTION </u></strong></span></span></p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Before: </span></span></li>
</ul><p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The picture below is when packet encryption connection is not applied. If you look at the TCP stream, you can see the query and results used.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/d469f818f4e2ac3eecbb9ca613407666.jpg" alt="9b1e1f8b15af7557e68deb1e122bea53.jpg" style="" /><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/e0a42fe91133bded89d80a8433392d7f.png" alt="bdea1082d3f90bcbeed9da948e547259.png" style="" /></p>

<p> </p>

<ul><li><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">After: </span></span></li>
</ul><p><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The picture below is a screenshot after applying the packet encryption connection. In this case,  displayed query and result values are encrypted and cannot be interpreted.</span></span></p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/4bab7b131f98e959f42e9e5627ee1380.png" alt="5af1197dde53b26acd39e38927c75025.png" style="" /></p>

<p> </p>

<p><img src="https://www.cubrid.org/files/attach/images/3826714/663/827/003/8c58949a7e25b0ce645347e287c28d96.png" alt="ba1a01af7df16a90c9fcffbec65c8d8e.png" style="" /></p>

<p style="margin-left:18pt;"> </p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[Contributing to Open Source Community/Project]]></title>
		<id>https://www.cubrid.org/3826945</id>
		<published>2020-06-23T14:45:18+00:00</published>
		<updated>2021-05-25T15:53:37+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3826945"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3826945#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by<strong> Charis Chau </strong>on<strong> </strong>06/23/2020<strong style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;"> </strong></span></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:left;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="line-height:107%;">What is an open source project? To answer this, let us start with a burger! Imagine an open source project is a burger selling in a restaurant. Every day, the chef makes thousands of burgers that have the same quality by following the same recipe from the restaurant. One day, customer A comes to the burger place to try the burger, and he/she loves it! Therefore, customer A decides to ask the chef whether he/she can get the recipe. Here, if the restaurant is open source, they will be happy to share the recipe to customer A, vice versa.</span></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/461224c6bcd38f869dd5fb5a84c237ab.png" alt="1.png" width="960" height="122" style="" /></p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><span style="line-height:107%;">After customer A gets the receipt, he/she decide to make the burger at home by him/herself! However, customer A is a meat lover and does not like onion that much, so he/she decide to change the recipe by taking out the onion and add more beef in the burger! At this point, customer A gets a new burger base on the same recipe from the restaurant. Now, if the restaurant is an open source restaurant, customer A can go to the chef and say ‘Hey! Your burger is great, but I’ve added more beef for people who like to eat meat and take out the onion for people who do not eat onion! You can add to your menu!’.</span></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">The role of the chef now becomes the committer. The chef will evaluate whether the modifications are valuable or not, and then decide whether to add to the restaurant menu. Either way, by sharing the changes of the new recipe, customer A has just become a contributor! </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/e8dca62adb02735f0e5ade8e6edc813e.png" alt="burger1.png" width="960" height="522" style="" /></p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:14px;">Open Source Project</span></span></p>

<p align="center" class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;margin-left:18pt;text-align:center;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">So, why? Why customer A wants to be a contributor? Why contributing to open source is worth it? More importantly, how can we contribute to an open source project? In this article, we are going to answer these questions and drop a few guidelines to those looking to contribute to our CUBRID project and community! </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">(Thanks for the burrito example in the article 'The Definitive Guide to Contributing to Open Source by Mr. Piotr Gaczkowski)</span></span></p>

<h4 class="author-card-name" style="margin:0px 0px 2px;padding:0px;border:0px;font-weight:500;line-height:1.15;font-family:Lato, sans-serif;vertical-align:baseline;color:rgb(10,10,35);background-color:rgb(255,255,255);"> </h4>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong>WHY Contribute?</strong></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Contributors who contribute to open source projects can generally be classified as organizational contributors who are corporations whole and individual contributors who we will focus on today in this article. For organizational contributors, reasons of contributing to open source projects can be varied from ‘it’s an effective way to collaborate with other company/projects with mutual interest’ to ‘want to understand the technology they are using’; etc., the specific rationale might vary for different organizations but it usually can be summarised to one simple fact that contributing in open source benefits their business.</span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Then how about individual contributors? What is the motivation to them? According to the study of ETH Zurich ‘Carrots and Rainbows: Motivation and Social Practice in Open Source Software Development’, there are three main types of motivations driving individual to contribute to open source project: </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><u><strong>1. Extrinsic Motivation </strong></u></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Back in the 1940s and 1950s, researches have shown that motivation is fuelled mainly by the prospect of an external reward or incentive. For example, money is a classic extrinsic motivator, so is winning awards, getting grades, or obtaining certification, eventually increasing your competence in the labor market. </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">For contributors to open source projects, contributing to open source not only means the software you are using is getting improved but also means that your existing skills of, for example, coding, user interface design, graphic design, writing can also be improved. </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">And, according to the paper of Lerner and Tirole ‘Some Simple Economics of Open Source’, individual contributors, mostly developers are motived by career concerns when developing open source software. It means that by publishing software that was free for all to inspect, they could signal their talent to potential employers and thus increase their value in the labor market. Notably, it has become almost an expectation in some industry segments for job applicants to have public GitHub code repositories, which are effectively part of their resume.</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><u>2. Intrinsic Motivation</u></strong></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Fun and enjoyment is a classic intrinsic motivator, which means that contributors are contributing because they are actually enjoying it! In addition, peer reputation and recognition are also sources of intrinsic motives; by contributing to open source projects, contributors can share and learn from people who have the same interest, get mentorship, or even form a lifelong friendship!</span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong><u>3. Internalised Extrinsic Motivation</u></strong> </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Participating in an open source project not always starting from because you want to get peer recognition, or you want to have a better career path. Sometimes, you are just developing something that you want for yourself, and in the process, you create something valuable to others, that is what we call ‘scratch your own itch.’ In this case, the initial motivation comes from a selfish need, but it evolves into more of an internalized desire to contribute! For example, Linus Torvalds wrote Git because Linux needed an appropriate distributed version control system.</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">In summary, why contributing to a free open source project? You probably not only can increase your competence in the labor market and getting a higher salary in the future; but also gain recognition from the community and achieve your intrinsic satisfaction!<span style="font-style:italic;"> </span></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong>How to Contribute?</strong></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;font-style:italic;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Contributing to open source is like walking up to a group of strangers at a party. Before start, you might want to do a screening and get used to the environment. </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Almost all open source projects used a version control system, which is a tool that helps with merging new code into the project (the main ‘repository’). Usually, the collaboration is centered around a website such as GitHub that hosts the central repository.  For CUBRID project, you can find information at our GitHub website at <a href="https://github.com/CUBRID" target="_blank">https://github.com/CUBRID</a></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:11pt;line-height:2;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/7fd10727102091373415bd21d529f220.jpg" alt="GitHub.jpg" width="697" height="814" style="" /></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></p>

<p style="text-align:center;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID GitHub</span></p>

<div style="text-align:center;"> </div>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">After you are comfortable with the GitHub system, try to search for the relevant projects you are interested about! There are 34 repos in CUBRID RDBMS Organisation waiting for you to explore! Once you have found the project you are interested in, Star and Fork the project!<span style="font-style:italic;"> </span></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="text-align:center;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/35a1ec2048274d914d31bda8d0de4be9.jpg" alt="repo.jpg" width="960" height="613" style="" /></p>

<p style="text-align:center;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID Repository</span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span> </span><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Now you’ve found a project you like, and you’re ready to make a contribution. There are all sorts of ways to get involved with an open source project, it all depends on how you are comfortable with! For developers, they can contribute on the code by doing the following:<span style="font-style:italic;"> </span>  </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;text-align:justify;"> </p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">·<span style="line-height:normal;">        <u>1. </u></span><u>Post Questions, Ideas, and Bug Reports </u></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">One of the benefits of joining a community is that you can find people and information through forums. Some people might find that is embarrassed to ask questions, however, everyone, even the experts, takes a journey from not-knowing to knowing.  Posting questions, ideas on forums not only can get the answer directly from different sources by worldwide experts; but also have a chance to gain more information around the topic/questions. Furthermore, by asking questions, posting ideas in an open communication way, you are actually benefiting people who come after you with the same question!</span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In CUBRID, we appreciate you to post questions, ideas, or bug reports at our forum channel: <a href="https://www.reddit.com/r/CUBRID/" target="_blank">https://www.reddit.com/r/CUBRID/</a>. </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/cdb774f9a489c8276b669b78ed6e8587.jpg" alt="reddit.jpg" width="960" height="175" style="" /></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID Reddit</span></p>

<p> </p>

<p> </p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">·<span style="line-height:normal;">        <u>2. </u></span><u>Find Open Issues/ Existing Issues to Tackle </u></span></span></p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;text-indent:-18pt;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Another way to contribute is by playing with the existing issues. Once you found the project you want to work on, explore its JIRA issue tracking system where you can find all the open issues you can work on. Find the issue you have an interest in and start work on it with confidence!  For CUBRID, there are several projects that you can browse issues and report an issue.</span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- CUBRID: <a href="http://jira.cubrid.org/projects/CBRD" target="_blank">http://jira.cubrid.org/projects/CBRD</a></strong></span></p>

<p> </p>

<p><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/bb64f0107d29047553b911afc4b3a45e.jpg" alt="JIRA1.jpg" width="960" height="55" style="" /></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><strong>- CUBRID APIs: <a href="http://jira.cubrid.org/projects/APIS" target="_blank">http://jira.cubrid.org/projects/APIS</a></strong></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/fffacde06603a9fa22f640f94f87deb4.jpg" alt="JIRA2.jpg" width="960" height="56" style="" /></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><strong>- CUBRID Tools: <a href="http://jira.cubrid.org/projects/TOOLS" target="_blank">http://jira.cubrid.org/projects/TOOLS</a></strong></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;text-align:justify;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/91e999b4ba37f69d22248580df166b54.jpg" alt="JIRA3.jpg" width="960" height="56" style="" /></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;text-align:justify;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;font-style:italic;text-align:justify;"> </p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="line-height:normal;"><span style="font-style:italic;">     </span><u>3. </u></span><u>Contribute Fixes and new Features</u></span></span></p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;text-indent:-18pt;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If you like the project or think it is useful for you, try to request fixes and new features, or you can sign the contributor agreements that give the project rights to the contributed code and start to add them by yourself.</span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="text-align:justify;line-height:2;"><font face="verdana, geneva, sans-serif"><span style="font-size:18px;">If none of the above is the way you want to contribute, don't worry! You can also: </span></font></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;"> </p>

<p class="MsoListParagraphCxSpFirst" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">o<span style="line-height:normal;">   </span>Automate project set up </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">o<span style="line-height:normal;">   </span>Improve tooling and testing</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">o<span style="line-height:normal;">   </span>Review code on other people’s submissions </span></span></p>

<p class="MsoListParagraphCxSpLast" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">…</span></span></p>

<p class="MsoListParagraphCxSpLast" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">In CUBRID, your opinion matters to us. If you have any other good ideas about contributing to our community, please feel free to leave them in our comment box! </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><strong>Contribution does not necessarily mean coding!</strong></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Contributing to open sources project is not only about coding! In fact, it is often that other important parts of open source projects are often neglected. Other than contributing to coding, you can also help: </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><u>o<span style="line-height:normal;">   </span>Enhance Communication </u></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Enhancing communication is not only beneficial to you and me but also great for the whole community! More importantly, it does not take up much of your time. Asking, answering, or discussing questions about the project on the open forum, or help moderate the discussion boards on conversation channels. </span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;"> </p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;"><u>o<span style="line-height:normal;">   </span>Improve the Public Knowledge Base </u></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Improving the public knowledge base is an effective way to contribute to open source projects beyond code. Knowledge is especially useful when it came from someone who is relatively new to the project and who can still remember their beginner’s mind. Improving the knowledge base by writing tutorials or producing blog posts on what you have learned is highly recommended! Read the documentation and if you feel something is missing or you found minor errors such as missing links or typos, raise an issue or submit edits to the official documentation! Our CUBRID documentation is right here: <a href="https://www.cubrid.org/manuals">https://www.cubrid.org/manuals</a></span> </span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/945/826/003/e4528e420fd259f1a4e588f541d904ca.jpg" alt="MANNUAL1.jpg" width="960" height="222" style="" /></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;">CUBRID Documentation</p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Another way to improve the public knowledge base is through translation. Some people might find that it could be challenging to contribute to open source when your primary language is not English; in fact, that is totally the opposite! Knowing another language could be a very valuable asset. The translation is an extremely valuable contribution that can spread software to a wider user base. Helping an open source project with translation is an incredibly helpful way to contribute because more people in the world can use your favourite open source project. If you are fluent in more than one language, translation is a great way to contribute!</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Besides, you can also, </span></span></p>

<p class="MsoListParagraph" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="font-variant:normal;line-height:normal;">   </span>Attend conference and workshops when they offer </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpFirst" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="line-height:normal;">   </span>Offer Mentorship </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="line-height:normal;">   </span>Design graphics </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="line-height:normal;">   </span>Event planning (conference…)</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="line-height:normal;">   </span>Put together a style guide to help the project have a consistent visual design</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">o<span style="line-height:normal;">   </span><span style="color:rgb(36,41,46);background:rgb(255,255,255);">Help community members find the right conferences and submit proposals for speaking</span></span></span></p>

<p class="MsoListParagraphCxSpMiddle" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;text-indent:-18pt;line-height:2;"> </p>

<p class="MsoListParagraphCxSpLast" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="color:rgb(36,41,46);background:rgb(255,255,255);">…</span></span></span></p>

<p class="MsoListParagraphCxSpLast" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-left:18pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><strong><span style="font-family:verdana, geneva, sans-serif;"><span style="font-size:18px;">Summary </span></span></strong></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Starting from explaining the concept of open source projects, why would people want to contribute to how to contribute practically, I hope this article can give you some general ideas about how to start contributing on CUBRID or other open source projects. In the world of open source, users and developers are the ones who shape the direction. We, CUBRID, appreciate your contribution! </span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em> </em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><strong>Reference</strong></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><span style="line-height:normal;">1. </span>Contributing to an open source project: How to get started: <a href="https://medium.com/mindsdb/contributing-to-an-open-source-project-how-to-get-started-6ba812301738" target="_blank">https://medium.com/mindsdb/contributing-to-an-open-source-project-how-to-get-started-6ba812301738</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>2. The Definitive Guide to Contributing to Open Source: <a href="https://www.freecodecamp.org/news/the-definitive-guide-to-contributing-to-open-source-900d5f9f2282/" target="_blank">https://www.freecodecamp.org/news/the-definitive-guide-to-contributing-to-open-source-900d5f9f2282/</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>3. Why do we contribute to open source software?: <a href="https://opensource.com/article/19/11/why-contribute-open-source-software" target="_blank">https://opensource.com/article/19/11/why-contribute-open-source-software</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>4. Carrots and Rainbows: Motivation and Social Practice in Open Source Software Development:  <a href="https://www.jstor.org/stable/41703471?seq=1" target="_blank">https://www.jstor.org/stable/41703471?seq=1</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>5. Some Simple Economics of Open Source: <a href="https://onlinelibrary.wiley.com/doi/abs/10.1111/1467-6451.00174" target="_blank">https://onlinelibrary.wiley.com/doi/abs/10.1111/1467-6451.00174</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>6. How to Contribute to Open Source: <a href="https://opensource.guide/how-to-contribute/" target="_blank">https://opensource.guide/how-to-contribute/</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>7. 8 non-code ways to contribute to open source: <a href="https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code" target="_blank">https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code</a></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span></p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em style="text-indent:-18pt;"><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em><em>8. Open Source in the Enterprise, Andy Oram&amp; Zaheda Bhorat</em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></em></span></span><span> </span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"><span> </span><span> </span><span> </span> </p></div>]]></content>
						
	</entry>
   <entry>
		<title><![CDATA[CUBRID License Model]]></title>
		<id>https://www.cubrid.org/3826781</id>
		<published>2020-06-08T15:36:23+00:00</published>
		<updated>2021-05-21T14:31:42+00:00</updated>
		<link rel="alternate" type="text/html" href="https://www.cubrid.org/3826781"/>
		<link rel="replies" type="text/html" href="https://www.cubrid.org/3826781#comment"/>
		<author>
			<name><![CDATA[charischau]]></name>
					</author>
				<content type="html"><![CDATA[<div class="xe_content"><p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Written by <strong>Charis Chau</strong> on 06/08/2020</span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Why Licenses Matter?</strong></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Open source licenses allow software to be freely used, modified, and shared. Choosing a DBMS with suitable licenses could save the development cost of your application or the Total Cost of Ownership (TCO) for your company. Choosing a DBMS without a proper license, you might find yourself situate in a legal grey area!</span></span></p>

<p> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>CUBRID Licenses</strong></span></span></p>

<p style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;"> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Unlike other open source DBMS vendors, CUBRID is solely under open source license instead of having a dual license in both commercial license and open source license. Which means that for you, it is not mandatory to purchase a license or annual subscription; company/organizational users can achieve the saving from Total Cost of Ownership (TCO).</span></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Since CUBRID has been open source DBMS from 2008, CUBRID has had a sperate-license policy for its server engine and interface. The server engine adopts the GPL v2 or later license, which allows distribution, modification, and acquisition of source, while the interface and tools have the BSD license in which there is no obligation of opening derivative works.  </span></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;margin-bottom:.0001pt;text-align:justify;line-height:12pt;"> </p>

<div style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/8c8d129d0f17d382c8b544d44ef3d500.jpg" alt="CUBRID Licenses.jpg" width="616" height="400" style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;" /></span></span></div>

<div style="font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;text-align:center;">
<p align="center" class="MsoNormal" style="margin-bottom:.0001pt;line-height:12pt;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">CUBRID License Structure</span></span></p>

<p align="center" class="MsoNormal" style="text-align:left;margin-bottom:.0001pt;line-height:12pt;"> </p>
</div>

<div style="text-align:left;font-family:'Open Sans', 'Helvetica Neue', 'Nanum Gothic', 'Malgun Gothic', Helvetica, Arial, sans-serif;font-size:14px;">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>GPL: General Public License</strong><em> (<a href="http://www.opensource.org/licenses/GPL-2.0" target="_blank">http://www.opensource.org/licenses/GPL-2.0</a>)</em></span></span></p>

<p style="line-height:2;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">The GPLv2 or later license gives users the freedom to use freely, but if they distribute it, they need to publish changes and their code under GPL license and shared with other developers and users, which mean that you are free to modify and distribute the source code of CUBRID if you have any improvements in mind. Still, you do need to re-release the second work. At the same time, this works the same for us, our company CUBRID is also obligated to release the work after modification!</span></span></p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"> </p>

<p style="line-height:2;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>BSD: Berkeley Software Distribution License</strong> (<a href="https://opensource.org/licenses/BSD-3-Clause" target="_blank">https://opensource.org/licenses/BSD-3-Clause</a>)</span></span></p>

<p style="line-height:2;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">BSD license gives users the freedom to full use, but we do need to keep copyright in the source code. However, there are no constraints on use and no obligation of re-releasing the secondary work, which means that even if DBMS-based application developers or independent software vendors (ISV) do not want to disclose the source code of their developed applications, that's totally fine! And you can even combine our DBMS with your proprietary software!  The development of a CUBRID-based application and sell it in the form of a commercial license or distribution by GPL does not cause any license problems.</span></span></p>
</div>

<div style="text-align:left;line-height:2;"> </div>

<div style="text-align:left;line-height:2;"> </div>

<div style="text-align:left;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Benefits of CUBRIID License Model </strong></span></span></div>

<div style="text-align:left;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="line-height:107%;">Why both GPL and BSD licenses? To answer this, let us take a walk into 5 scenarios:</span></span></span>

<div style="text-align:left;"> 
<div style="text-align:left;">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em><u>Scenario 1: Library Link</u></em></strong></span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><span style="background:rgb(255,255,255);"><strong>Developer, Alex:</strong> 'I want to develop and sell an electronic payment system for small and medium-sized businesses. If I choose to use CUBRID as DBMS, should I open my product source code or purchase the commercial license?'</span></em></span></span></p>

<p> </p>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em>Solution Provider, Ben:</em></strong> '<em><span style="background:rgb(255,255,255);">I want to create an installable bulletin board. As a DBMS interface, I am using JDBC. If I want to distribute to others the bulletin board I created, should I open my source code?'</span></em></span></span></p>

<p> </p>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the above two examples, both Alex and Ben want to link various libraries and drivers provided by DBMS in their applications. For using DBMS features, a JAVA application should be linked to the JDBC driver; a PHP application should be linked to the PHP interface, and so on.</span></span></p>

<p style="line-height:2;"> </p>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">If Alex and Ben want to use DBMS with the GPL license model, they should open the entire source code of the linked application. If they decide to go with MySQL under their Commercial License-Based Enterprise Version, they do not have to open the source code. However, they do have to pay for the license!  </span></span></p>

<p style="line-height:2;"> </p>

<p class="inline" style="margin:0cm 0cm .0001pt;text-align:justify;line-height:2;background:#ffffff;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Therefore, if they choose the GPL-based only DBMS<strong><em>, </em></strong>they should either open the application's source code or purchase the commercial license (in case of a dual license policy). However, since CUBRID applies the BSD license to all the interfaces linked to applications, Alex and Ben do not have to open the source code of their application when they choose CUBRID as their back-end database system.</span></span></p>

<p> </p>

<div style="text-align:left;">
<div style="text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/435eab257ae446ec0def2cfc52afe511.png" alt="s1.png" width="195" height="278" style="font-family:Calibri, sans-serif;font-size:11pt;" /></span></span></div>

<p style="font-family:Calibri, sans-serif;font-size:11pt;"> </p>

<p class="MsoNormal" style="font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em><u>Scenario 2: Simple Calling</u></em></strong></span></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><span style="background:rgb(255,255,255);"><strong>Solution Provider, Chris:</strong> 'I want to develop a DBMS backup management system. If it is useful, I want to sell it as a package. Because it is a backup management system, it just processes DBMS backup files or calls utilities without linking to the DBMS interfaces or libraries. Is the license still an issue for this case?'</span></em></span></span></p>

<p> </p>

<p class="MsoNormal" style="font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="background:rgb(255,255,255);">This is the case when the application simply calls DBMS interfaces or libraries without directly linking to them. However, if GPL-based DBMS is used, Chris should still open the source codes of the application just as when you link libraries. However, Chris will not have the obligation to open the source code under CUBRID. </span></span></span></p>

<p> </p>

<p class="MsoNormal" style="text-align:center;font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;line-height:12pt;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><span style="background:rgb(255,255,255);"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/c16fba2104a617cde40870c098769617.jpg" alt="s2.jpg" width="200" height="275" style="" /></span></span></span></p>

<p class="MsoNormal" style="text-align:center;font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;line-height:12pt;"> </p>

<p class="MsoNormal" style="text-align:left;font-family:Calibri, sans-serif;font-size:11pt;margin-bottom:.0001pt;line-height:12pt;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em><u>Scenario 3: Distribution Between Corporations </u></em></strong></span></span></p>

<p> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><span style="background:rgb(255,255,255);"><strong>Company, D:</strong> 'Our headquarter is located in the USA, and we have local branches in Japan, China, and Korea. Can those branches provide services by using the games created by our headquarter?'</span></em></span></span></p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"> </p>

<p class="inline" style="margin:0cm 0cm .0001pt;text-align:justify;line-height:2;background:#ffffff;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">When distributing an application created by DBMS with the GPL license to branch companies, Company D should open the source code of the application or purchase a commercial license. However, CUBRID provides the most competitive license model with companies or solution vendors that plan to enter global markets.</span></span></p>

<p> </p>

<p class="inline" style="margin:0cm;margin-bottom:.0001pt;text-align:justify;line-height:12pt;background:#ffffff;"> </p>

<p class="inline" style="margin:0cm;margin-bottom:.0001pt;text-align:justify;line-height:12pt;background:#ffffff;"> </p>

<p style="text-align:center;font-family:Calibri, sans-serif;font-size:11pt;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/04ea7b34026e107cccafc19fc8300ffa.jpg" alt="s3.jpg" width="202" height="277" style="" /></span></span></p>

<p style="text-align:center;font-family:Calibri, sans-serif;font-size:11pt;"> </p>

<div style="text-align:left;">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em><u>Scenario 4: Interface Modification </u></em></strong></span></span></p>

<p> </p>

<p><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><span style="background:rgb(255,255,255);"><strong>Developer, Emma:</strong> 'It is inconvenient because the PHP interface in DBMS does not provide dynamic SQL features. If I modify and use the PHP interface, should I open the modified interface or a linked application?'</span></em></span></span></p>

<p> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the case of the GPL license, if the source code is modified, the source should be opened, and the improved function should be shared among other users. However, in the case of the BSD license, it is not necessary to open the modified source when it is used for either individual or commercial purposes.</span></span></p>
</div>
 

<p style="text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/74ccd54a68587286332640e2fdaad896.jpg" alt="s4.jpg" width="171" height="210" style="" /></span></span></p>

<p style="text-align:left;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In the above scenarios, we can clearly see the benefits of CUBRID License Model; it can be summarised as follow: </span></span></p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:12pt;"> </p>

<div style="text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/d7d8835ad6f2fa5d18466ba8028489ed.jpg" alt="summary.jpg" width="657" height="119" style="" /></span></span></div>

<div style="text-align:left;">
<p align="center" class="MsoNormal" style="margin-bottom:.0001pt;text-align:center;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><u>Benefits of CUBRID License Model</u></em></span></span></p>

<p align="center" class="MsoNormal" style="text-align:left;margin-bottom:.0001pt;line-height:12pt;"> </p>
</div>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong><em><u>Scenario 5: Server Modification </u></em></strong></span></span></p>

<p> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><em><span style="background:rgb(255,255,255);"><strong>Company, F:</strong> 'In our company system, the "organization chart" should be included in all pages. Because of frequent organization changes, recursive queries are indispensable. If I add this feature to the DBMS engine, should I open the modified DBMS code and our company system?'</span></em></span></span></p>

<p> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Even though the above scenarios provide shreds of evidence that both GPL and BSD license can bring higher degree of freedom to users, the DBMS engine is a core infrastructure for software development, so it is considered proper to share improved features with many other users. To share the improved features of the CUBRID server engine, the database server adopted the GPL license. Therefore, if company F modifies the database server engine, you should open the modification to other users.</span></span></p>

<p> </p>

<div style="text-align:center;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><img src="https://www.cubrid.org/files/attach/images/3826714/781/826/003/641129120a89ec8bec9cc47370f6f83a.jpg" alt="s5.jpg" width="172" height="210" style="" /></span></span></div>

<div style="text-align:center;"> </div>

<div style="text-align:center;"> </div>

<div style="text-align:left;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>Summary </strong></span></span></div>

<div style="text-align:left;">
<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">In this article, we have introduced the CUBRID License Model and explained the reason why we think CUBRID is trying to give users the maximum freedom and benefits by giving examples and comparing them with GPL-based only DBMS. </span></span></p>

<p> </p>

<p class="MsoNormal" style="margin-bottom:.0001pt;text-align:justify;line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;">Like many other open source software organizations, CUBRID is structured under the revenue model, which only receives the cost of services (developmental support, operational support). Besides, CUBRID is not with the vendor, but with the client, clients can get the service they want at the time they want. In other words, using CUBRID does not require a mandatory service contract!  We realize that it is not easy to introduce open source software; therefore, clients of CUBRID can sign a service contract and receive technical support services according to their needs and needs.</span></span></p>

<p> </p>
</div>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><strong>References</strong></span></span></p>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><a href="https://www.cubrid.org/cubrid">https://www.cubrid.org/cubrid</a></span></span></p>

<p style="line-height:2;"><span style="font-size:18px;"><span style="font-family:verdana, geneva, sans-serif;"><a href="https://opensource.org/licenses" target="_blank">https://opensource.org/licenses</a></span></span></p>

<p style="line-height:2;"> </p>
</div>
</div>
</div>
</div>

<div>
<div class="gtx-trans-icon"> </div>
</div></div>]]></content>
						
	</entry>
</feed> 
