Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

Know your CUBRID - Intermediate Quiz

# of questions: 20

Description: The intermediate level quiz consists of 20 questions. They are intended to check how well users know the inner structure and the workflow of the CUBRID database, its SQL syntax, the output of more sophisticated SQL queries, the CUBRID utilities, etc. This quiz is more complex than the beginner level. But the real database administrators will love to challenge themselves with these tricky questions. See if you are one of them!

Question 1

1. What is the result of the last SELECT in the following SQL script?
CREATE TABLE a(id INT);
INSERT INTO a VALUES(3);
SELECT INCR(id) FROM a;
SELECT DECR(id) FROM a;

  • 2
  • 3
  • 4
  • 5

Question 2

2. Which of the followings is true about cub_cas (CUBRID Common Application Server)?

  • It acts as a common application server used by all the application clients that request connections to CUBRID.
  • It acts as the database server's client and provides the connection to the database server upon the client's request.
  • It performs tasks such as query parsing, optimization, execution plan.
  • It monitors the database performance statistics.

Question 3

3. Which of the followings is true about the CUBRID Broker?

  • The Broker is responsible for executing SQL statements.
  • The Broker is the middleware between the clients and the CUBRID server.
  • The Broker is an application which enables the CUBRID Manager to manage the CUBRID server.
  • A Broker may contain several individual Brokers.

Question 4

4. What is the result of executing the following SQL script?
CREATE TABLE test(id INT);
INSERT INTO test VALUES(3);
SELECT CEIL(id) FROM test;

  • 3
  • Syntax error in the 1st line
  • Syntax error in the 2nd line
  • Syntax error in the 3rd line

Question 5

5. What is the “comment” mark used in CSQL scripts?

  • #
  • //
  • --
  • All of the above

Question 6

6. What is the result of the following SQL script?
CREATE TABLE multiset_tbl ( col_1 multiset(INT, CHAR(1)));
INSERT INTO multiset_tbl VALUES ({3,3,3,2,2,1,0,'c','c','c','b','b','a'});
SELECT * FROM multiset_tbl;

  • {0, 1, 2, 2, 3, 3, 3, 'a', 'b', 'b', 'c', 'c', 'c'}
  • {0, 1, 2, 3, 'a', 'b', 'c'} {3, 3, 3, 2, 2, 1, 0, 'c', 'c', 'c', 'b', 'b', 'a'}
  • {0, 1, 2, 3, 'a', 'b', 'c'}
  • Syntax error

Question 7

7. What is the purpose of the NO_STATS SQL hint?

  • The query optimizer does not update statistics information.
  • In general, it will help executing a query faster.
  • Related to a table join, the query optimizer creates a sort merge join execution plan with this hint.
  • None of the above

Question 8

8. The AUTO_INCREMENT column attribute can be defined for which of the following data types in CUBRID?

  • SMALLINT
  • INTEGER
  • NUMERIC(p, 0)
  • DECIMAL(p, 0)

Question 9

9. What is the result of the last SELECT in the following SQL script?
CREATE TABLE test1(id INT);
INSERT INTO test1 VALUES(3);
SELECT id FROM test1 WITH INCREMENT FOR id;

  • 3
  • 4
  • NULL
  • Syntax error in the 3rd line

Question 10

10. Which of the followings SQLs needs to be executed to see a query execution plan, but not execute the query itself?

  • SET OPTIMIZATION LEVEL 257
  • SET OPTIMIZATION LEVEL 258
  • SET OPTIMIZATION LEVEL 259
  • None of the above

Question 11

11. What is an online backup?

  • It can be executed while the database is started.
  • It is executed from the same machine where the server is running.
  • It forces the database to shut down if it is currently running, performs an automated backup, and then restarts the database.
  • None of the above

Question 12

12. What is the object you need to query to find all the users in the database?

  • db_user
  • _db_user
  • users
  • _users

Question 13

13. Which of the following statements is true?

  • A “group” is made of users.
  • A database user and its members are called a "group".
  • CUBRID does not have “groups”, only “users” and “roles”.
  • None of the above

Question 14

14. What is the purpose of the cubrid lockdb utility?

  • It is used to lock a database.
  • It is used to set a database in read-only mode.
  • It is used to check the information about the lock being used by the current transaction in the database.
  • It is used to close all current connections to a database.

Question 15

15. How can you define a lock timeout in CUBRID?

  • It is set in cubrid.conf, as a server parameter.
  • It is automatically set to 99 min.
  • Using SET TRANSACTION LOCK TIMEOUT
  • It can not be defined.

Question 16

16. Which of the followings is true related to tables inheritance?

  • For an object without a super class, attributes are defined in the same order as in the CREATE statement.
  • For multiple inheritances, the order of the super class attributes is determined by the order of the super classes specified during the class definition.
  • For an object without a super class, attributes are defined in alphabetical order.
  • None of the above

Question 17

17. What is the correct statement for removing the “public” user?

  • DROP USER public;
  • ALTER USER public REMOVE;
  • REMOVE public;
  • None of the above

Question 18

18. What is the result of the following SQL script?
CREATE TABLE Foo(name VARCHAR(255));
SELECT class_name, partitioned FROM db_class WHERE class_name = 'Foo';

  • ‘Foo’, ‘NO’
  • ‘Foo’, ‘YES’
  • ‘Foo’, NULL
  • No results

Question 19

19. What is the purpose of the ROW_COUNT() function?

  • The ROW_COUNT function returns the number of rows returned by the current statement.
  • The ROW_COUNT function returns the number of rows updated (UPDATE, INSERT, and DELETE) by the previous statement.
  • The ROW_COUNT function returns the number of rows in a table or a view.
  • All of the above are true

Question 20

20. What is the result of the following SQL script?
PREPARE stmt2 FROM 'SELECT MID(?,?,?)';
EXECUTE stmt2 USING '12345abcdeabcde',6,5;

  • 'abcdeabcde'
  • '12345a'
  • 'abcde'
  • 'bcdea'




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: