Create SQL programming problems with different scenarios
SQL is the de facto standard of how programmers communicate with relational databases. Sphere Engine Problems supported SQL from the outset. Now, triggered by our customers’ needs, we came up with a new way of creating and solving Structured Query Language programming problems.
The Schema approach
There are various scenarios to choose from when you try to teach SQL or assess one's practical skills in handling SQL queries. The most common one is to ask your end user to create a specific database using CREATE TABLE
and populate it with data using the INSERT
command.
We can illustrate this use case with the following problem.
In this example, the problem-solver has to create a table with certain rows and populate it with data. The order of code execution, in this case, is as follows:
- the source code of the end user (in this example
CREATE TABLE
,INSERT
) - the source code of the test case
This order of executing SQL source code inside Sphere Engine is supported by the SQLite - schema
programming language.
The Queries approach
But what if we need to create a programming problem that executes code in an exactly opposite order? Now Sphere Engine Problems supports exactly that.
Let’s illustrate this use case with the following problem.
In this SQL programming challenge, the problem-solver is asked to operate on an existing pre-defined table. The order of execution, in this case, is as follows:
- the source code of the test case
- the source code of the end user (in this example
SELECT
)
This order of executing SQL source code inside Sphere Engine is supported by the SQLite - queries
programming language.
This new capability opens up a whole new spectrum of creating your SQL problems to teach, assess, and recruit SQL developers. Sphere Engine currently supports SQLite 3 and we hope to support more SQL versions in the nearest future.
At Sphere Engine we combine years of experience in recruiting developers and assessing coding skills with the latest technologies. Our APIs and software components enable creating programming challenges, online compilers, IDEs, and teaching coding to millions of end-users across the globe. We work with companies like Infosys, Amazon, Edhesive, support thousands of educational institutions around the world, and run our own community-focused platforms - Spoj and ideone.