CUBRID WebQuery Tutorial
The scope of this tutorial is to take you to an introductory tour and show you the main features of the CUBRID WebQuery. Before you go on reading we highly recommend you to install it and start replicating the examples below. To learn how to install CUBRID WebQuery, read the Instructions. You can also download this tutorial in PDF.
Table of Contents
- Login to CUBRID
- Home Page
- Browse Structure
- Create and Alter Database Objects
- View, Insert, Update and Delete Data
- Execute SQL Statements
- Import and Export data
- Database Users
- Error Handling
- Advanced Configuration
- Other Sweet Features Left for a User
- See also
- Getting Help
Login to CUBRID
The first thing you need to do when CUBRID WebQuery is started is to login to a CUBRID database.
Remember: CUBRID WebQuery allows connecting to one database at a time. Therefore, if you need to switch to a different CUBRID database, you will have to open a new instance of CUBRID WebQuery in another browser window, or first logout from the current database and then login to another database.
As you can see from the above screenshot, you will need to fill out the following fields:
- Host server and the broker port separated by a collon (the default ports are usually 30000 and 33000)
- Database username
- User password
- Database name (we will be using the default demodb database in this tutorial)
When you finish specifying these parameters, click the Login button.
Once you successfully connect to a CUBRID database, you will see the Home page.
The application interface is divided into 4 main areas:
- Import / Export
Allows accessing to the same functionality as the top-menu, but at the database level.
Left-side Database Structure Browser
Displays the objects in the database (tables and views) in the form of a tree view.
Main Content Area
When a user selects various menus or functions from the menus, this is where the details will being displayed.
The general rule for menus is that whenever a user clicks on the item in the left-side menu, the functionality will apply to the “database level”, while clicking on the top menu items will activate the corresponding menu functionality and apply it to the “object level” (table).
For example, if a user clicks on the database name “demodb” on the left-side menu (database structure browser area), the database structure will be displayed on the main contents area as shown below.
CUBRID WebQuery makes it easy to browse the database tables and views. On the left side of the application window (in the database structure browser area), a database structure information will be available which will include the list of objects (tables, views) in the database and the number of rows each object has.
It is possible to expand or collapse the nodes of the tree as well as see the object details by directly clicking on them. By default, the page will load the records from the table or the view.
Tip: If you want to refresh the database information completely, including the list of objects and the number of rows, hit Shift+F5 (Hard Refresh).
Select the "nation" table form the left database structure browser and click on the top menu “Browse” item to SELECT the records from that table (or from the view, if a view is selected instead).
Create and Alter Database Objects
With CUBRID WebQuery it is very easy to create new database objects or alter the existing ones. The application provides a friendly user interface to help accomplish these tasks. In order to access this functionality, click on the menu Create objects on the left-side menu or Create button from the top menu:
There is a built-in support for creating the following objects:
You can also access the “Alter” functionality from the database browser area. When viewing a table structure, click on the “Structure” menu item:
View, Insert, Update and Delete Data
To see the information about a particular Table or View record, select the record and click the button as shown in the image below.
To insert new records or update the existing ones, select the row(s) necessary to edit then click the “Edit” link.
To delete records select them and click the “Delete” item. You will be asked to confirm the operation:
Execute SQL Statements
One of the features implemented in CUBRID WebQuery is the ability to execute any SQL statement from the browser and display its results in a versatile and flexible way. Users will get access to this feature by clicking the “Query” menu item, which will lead to the following page:
In the results grid which holds the SQL statement execution results user can perform the following actions:
- Resize the columns
- Sort (click on the columns header)
- Navigate to another “page” of results
To increase the speed of writing SQL statements a list of statements templates is provided in the drop-down combobox. Select the code template and click on the “Paste SQL code template”.
Tip: You can execute not only SELECT statements, but any other SQL statement, like INSERT, UPDATE, CREATE etc.
Import and Export data
To export or import data from/to CUBRID, click on the “Import” or “Export” menu items.
As you can see from the above screenshots, one can export or import data using one of the following data formats:
- SQL Statements
You can also choose to export or import only the database structure, without the data in the tables.
For the export destination, you can choose the Browser option or the Text file. If Browser has been selected as the export destination, the data will be displayed in a text box which you can later copy and paste to another application. In case a Text File is chosen the data will be saved to a file.
Remember to indicate a location where CUBRID WebQuery has the write-permission to create a file.
Below is an example of the displayed export results when choosing the Browser as the export destination.
When selecting “Database Users” from the left side menu, a list of CUBRID database users will be displayed.
In order to view the detailed user rights, select a user and click the “View selected users privileges” link which will display the following page.
CUBRDI WebQuery will handle the database errors in a friendly user manner by displaying the error messages on the same page without redirecting to some other dedicated error page, thus allowing you to correct the errors instantly and easily.
To change some of the advanced configuration values such as:
- Auto-update check
- Gzip web server support
- The number of records displayed per page,
... edit the “config.php” file located in the root of CUBRID WebQuery directory. Then restart the application.
Tip: You can even set the default database connection parameters, so that the application will login automatically. Be aware, this is not recommended on a public installation, for obvious security reasons!
Other Sweet Features Left for a User
There are other interesting features in CUBRID WebQuery which allows users to increase the speed of database management. Here are some of them:
- Easy keyboard shortcuts
- Multiple rows editing
- Themes support
- and others…
If you have any difficulties with CUBRID WebQuery, post your questions to the dedicated forum at