Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

CUBRID it! Programming Contest

June 1st – 22nd 2011

We are happy to announce that the winners have been selected, you can can find them here

 

Programming Contest

As of 22 June we are no longer accepting submissions. We hope it was as fun to you as it was to us! Thank you to all coders for submitting their solution.
We encorage everybody to send us feedback at contact [at] cubrid.org.

The winners will be announced on July 5th on this page, so stay tuned! We will also contact each winner individually.

Update: due to the fact that there were lots of submitted solutions it will us take longer to evaluate all of them.
The final results will be published on July 11th. Thank you for your patience.

The 10 participants, who will score the highest, will get the following prizes:

  • 1st place - Apple iPad 2
  • 2nd and 3rd place - Amazon Kindle
  • 4th and 5th place - Nikon Coolpix S3100 Digital Camera
  • 6th to 10th place - Amazon 50$ gift certificates

Community Contest

Spread the word about the programming contest and win one of the following prizes:

  • 1 Apple iPod
  • 2 Amazon gift certificate ( 100$ )
  • 5 Amazon gift certificate ( 50$ )

All you have to do is retweet the contest start announcement: retweet

Read more about the contest

What is this contest all about?

Quick links

CUBRID it! is an online programming contest which requires finding and coding the best solution for a SQL related problem we will be proposing.

This programming contest is organized by the CUBRID Open Source community once every year.

This year the contest will be held between June 1st and June 22nd.

CUBRID it! is open to all talented developers who are willing to challenge their skills and compare themselves to other passionate developers from all around the world.

In the end, it’s all about coding and having fun, together with other CUBRID fans!

Participation rules

To participate in the contest, you must be at least 18 years old. The contest is open to both individuals and teams. Participants must agree that the code they submit will have one of the following open source licenses attached: GPL or BSD. If not specified explicitly, a GPL v2 license will be assumed by default.

If you are selected as a contest winner, you agree that we may publicize your name or your user id, and the description of work you did for the contest.

How is the contest organized?

The participants will use their own resources ( computers ) to code the solution, using either PHP or JAVA. When the code is ready, all it is required to do is to upload it to our website ( we will provide an easy to use upload mechanism ). The code will be tested using a CUBRID 8.3.1 installation, Java 6.x and PHP 5.3.x.

The winners will be selected by a jury which will judge based on the below criteria:

  • Correctness of the solution
  • Efficiency of the solution

More precisely, this is how the points will be granted (there are max. 100 points that can be granted to each participant):

  • 0-80 points for the correctness of the solution
  • 0-5 points for the performance ( execution speed )
  • 0-5 points for the coding quality, including code documentation
  • 0-5 points if the code works fine also in CUBRID 8.4.0 beta!
  • 0-5 points for your feedback, suggestions; we would like to hear back from you, including your ideas regarding the next year contest :)

The contest problem can be found here.

Do not forget to follow us on Twitter or Facebook to get updates and find out if you are the winner!

Remember, you can only submit your code until June 22nd, 2011, 12 AM GMT using the form below:

* if you want to submit multiple files, please make an zip archive


Don't upload multiple files, make an archive containing all your source files and add a descriptive readme.txt if you feel it is necesarry.

You can also submit your solution via mail at contact [at] cubrid.org, just mention "CUBRID it!" in the subject of your mail.

The contest winners will be announced on www.cubrid.org and will be notified via e-mail/twitter, by July 1st 2011.

Prizes

We have great prizes for you! The 10 participants, who will score the highest, will get the following prizes:

  • 1st place - Apple iPad 2
  • 2nd and 3rd place - Amazon Kindle
  • 4th and 5th place - Nikon Coolpix S3100 Digital Camera
  • 6th to 10th place - Amazon 50$ gift certificates

The prizes will be delivered directly to your address!

Contest & Community

If you would like to discuss ideas, give feedback and discuss anything related to this contest, please use the CUBRID it! forum.

You can also contact us by email, at contact@cubrid.org .

Don’t hesitate to ask us if you need help understanding and solving the problem – we are more than happy to help!

Share the fun :)

Along with the main programming contest there will be another contest, for those who want to contribute spreading the word about this contest! In other words, you get the chance to win twice!

It will be up to you to choose to participate in both competitions or in only one of them - there are no restrictions.

How to contribute?

  • Post on your blog about the contest or about CUBRID overall
  • Tweet on Twitter
  • Post on your Facebook wall or groups
  • Let you friends know about the contest through forums, and so on…

If you decide to write something, let us know the URL of the resource your post and you may win one of the following great prizes:

  • 1 Apple iPod
  • 2 Amazon gift certificate ( 100$ )
  • 5 Amazon gift certificate ( 50$ )

By retweeting the official CUBRID it! start message you are automatically enrolled in the lottery for one of the above prizes. You retweet it by clicking retweet or you can check out the original message here.

Contest Problem

Given all the tables in a database (but only the user tables, not also the system tables), determine:

  • The value which occurs the most times (is duplicated the most times) in the database and it is “non-numeric”! (“non-numeric” means that the respective value does not contain only digits – it must contain at least one non-digit character; for example, “1298” is “numeric”, but “12,98” is “non-numeric” ( and also “12.98” ), because it contains the “,” character ; same goes for “-100” – it is considered “non-numeric” as well, because of the “-” sign).
  • The number of occurrences for the value found above.

Additional notes:

  • Assume that the result to the problem is unique; there are no multiple values with the same maximum number of occurrences – just one single value is the most duplicated.
  • If a table column data type is not a string-type, then consider the respective values in the column as casted to “string”; this means that you should deal only with string or string-converted/casted values when doing the analysis. When converting a data type to string, assume that no extra characters will be added (for example, a number converted to string, no matter the system locale or regional settings, will not “get” thousands separators )
  • The tables in the database contain only columns of the following data types: VARCHAR, CHAR, STRING, INT, SMALLINT, BIGINT, NUMERIC, FLOAT, DOUBLE, DATE, TIME, DATETIME and TIMESTAMP.
  • The maximum length of any of the table column values, converted to string, is 255.
  • There are no restrictions on the memory used, however we will grant points for the memory usage solution efficiency.
  • It is allowed to create new tables/objects in the database, with the condition of deleting them when the program ends.
  • The database name where the program is executed is “contest”; the username is “public”; the password is empty. But you don’t need to do anything - the template code we are providing will take care of the connection to the database with the correct parameters.
  • The output results must be stored by you in a table named “results”, which has the following structure:

    Column Data type
    userid VARCHAR(64)
    most_duplicated_value VARCHAR(255)
    total_occurrences INTEGER
    execution_time INTEGER

    You don’t need to create this table in your submitted code – it will be already created in the database where we will test your code.

    But you will need to populate it! You must:

    • Set the “userid” to you own user
    • Set the “most_duplicated_value” and the “total_occurrences” to the results you found
    • Do not populate the “execution_time” column – the template code we provide will do this automatically.


Startup files

For Windows users that use Eclipse to code their solution we have prepared an all in one archive that contains everything you need. You can download it from here.

In order to help you get started on your coding we prepared some startup files. If you choose to code the solution in PHP you can download the files from here ( PDO ) or here ( PHP API ). If you choose Java you can get the files from here.

Example:

In the three tables below, the “non-numeric” value which occurs the most times is “xyz” (9 times).

contest_problem.jpg

Here is the script to create the ”results” table in your own development database, so you can properly test your code before you submit it:

CREATE TABLE "results"(
"userid" varchar(64) NOT NULL,
"most_duplicated_value" varchar(255) NOT NULL,
"total_occurrences" integer,
"execution_time" integer,
CONSTRAINT pk_results_userid_most_duplicated_value PRIMARY KEY("userid","most_duplicated_value")
);

Coding Prerequisites

In order to code the solution for the proposed problem you will need to have CUBRID 8.3.1 installed and a Java or PHP distribution (or both, if you plan on submitting solutions in both Java and PHP). Depending on your OS, please choose the appropriate CUBRID version from the ones below.

OS CUBRID 8.3.1 OS Requirements CPU
Windows 32bit CUBRID-Windows-x86-8.3.1.1002.exe * Windows XP Home 32bit
* Windows XP Pro
* Windows 2003
* Windows Vista 32bit
* x86
* Intel EM64T
* AMD64
CUBRID-Windows-x86-8.3.1.1002.zip
Windows 64bit CUBRID-Windows-x64-8.3.1.1002.exe * Windows Vista 64bit * Intel EM64T
* AMD64
CUBRID-Windows-x64-8.3.1.1002.zip
Linux 32bit CUBRID-8.3.1.0173-linux.i386.sh * Over CentOS 4
* Over Fedora 4
* Over Ubuntu 6.10
* Over openSUSE 11
* Over Gentoo 2007
* Over Asianux 2
* Over Debian 4
* x86
* Intel EM64T
* AMD64
CUBRID-8.3.1.0173-linux.i386.tar.gz
CUBRID-8.3.1.0173-el5.i386.rpm
Linux 64bit CUBRID-8.3.1.2003-linux.x86_64.sh * Over CentOS 4
* Fedora 11
* Ubuntu 9.04
* Intel EM64T
* AMD64
CUBRID-8.3.1.2003-linux.x86_64.tar.gz
CUBRID-8.3.1.2003-el5.x86_64.rpm
Linux SRPM CUBRID-8.3.1.2003-el5.src.rpm

If you choose to code in PHP, you will need to have the appropriate CUBRID PHP driver installed. You can use the PHP Driver or even the CUBRID PDO Driver – it is up to you to decide which ones fit your better.

As for the CUBRID Jdbc driver, it is automatically installed along with the CUBRID distribution, in the jdbc folder.

To make things easier, we will provide startup code templates, for both Java and PHP.

If you have questions or things to clarify about the tools or libraries to use, don’t worry, just let us know and will help.

Be a real CUBRID fan!

One thing you can do, for example, is to support our efforts by posting a small article/banner on your website or blog and let everyone know about the CUBRID it! contest.

CUBRID it! banner embeddable code ( 240px Width, 150px height )

CUBRID IT! Programming challenge

CUBRID it! banner embeddable code ( 200px Width, 125px height )

CUBRID IT! Programming challenge

CUBRID it! banner embeddable code ( 160px Width, 100px height )

CUBRID IT! Programming challenge

We will highly appreciate every your effort to let other users know about CUBRID – a high performance open source database which is a best choice whenever you need one! Thank you!

See also

CUBRID Web Manager Bug Bash Event!

On behalf of CUBRID open source database project we are proud to announce the fifth community competition with prizes worth the challenge. The...

CUBRID Q&A Event

Greatings to everyone!

About the CUBRID Quizland

This is how we are going to call our new environment (CUBRID Quizland), the virtual space where you can challenge yourself with database related quizz...




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: