<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
    <channel>
        <title>CUBRID WebQuery Tutorial</title>
        <link>http://www.cubrid.org/?mid=cubrid_web_query_tutorial</link>
        <description>CUBRID WebQuery Tutorial</description>
        <language>en</language>
        <pubDate>Mon, 18 Oct 2010 17:45:59 -0800</pubDate>
        <lastBuildDate>Thu, 13 Dec 2012 03:55:16 -0800</lastBuildDate>
        <generator>XpressEngine 1.4.4.1</generator>
                        										        <item>
            <title>

CUBRID WebQuery ...</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/cubrid_web_query_tutorial</link>
            <guid isPermaLink="true">http://www.cubrid.org/cubrid_web_query_tutorial</guid>
                                    <description><![CDATA[<div class="article">

<h1>CUBRID WebQuery Tutorial</h1>
<div class="category"><a href="/about_cubrid_web_query" style="color:#CCC">⇐CUBRID WebQuery</a></div>

<p>The scope of this tutorial is to take you to an introductory tour and show you the main features of the&nbsp;<b>CUBRID WebQuery</b>. 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 <a href="/about_cubrid_web_query#instructions" target="_blank">Instructions</a>. You can also <a href="/files/docs/tutorials/webquery/CUBRID%20WebQuery%20Tutorial.pdf" target="_self">download this tutorial in PDF</a>.</p>

<h3>Table of Contents</h3>

<ul>
<li><a href="#login" target="_self">Login to CUBRID</a></li>
<li><a href="#home-page" target="_self">Home Page</a></li>
<li><a href="#browse" target="_self">Browse Structure</a></li>
<li><a href="#create-alter" target="_self">Create and Alter Database Objects</a></li>
<li><a href="#view-insert" target="_self">View, Insert, Update and Delete Data</a></li>
<li><a href="#execute-sql" target="_self">Execute SQL Statements</a></li>
<li><a href="#import-export" target="_self">Import and Export data</a></li>
<li><a href="#database-users" target="_self">Database Users</a></li>
<li><a href="#error-handling" target="_self">Error Handling</a></li>
<li><a href="#advanced-configurations" target="_self">Advanced Configuration</a></li>
<li><a href="#other" target="_self">Other Sweet Features Left for a User</a></li>
<li><a href="#see-also" target="_self">See also</a></li>
<li><a href="#getting-help" target="_self">Getting Help</a></li>
</ul>

<h2 id="login">Login to CUBRID</h2>

<p>The first thing you need to do when CUBRID WebQuery is started is to <b>login to a CUBRID database</b>.</p>

<p><b><i>Remember:</i></b> 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.</p>

<p class="center"><img width="351" height="270" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image001.png" alt="Login to a Database" editor_component="image_link"/></p>

<p>As you can see from the above screenshot, you will need to fill out the following fields:</p>

<ul>
<li>Host server and the broker port separated by a collon (the default ports are usually 30000 and 33000)</li>
<li>Database username</li>
<li>User password</li>
<li>Database name (we will be using the default <b>demodb</b><b> </b>database in this tutorial)</li>
</ul>

<p></p>
<p>When you finish specifying these parameters, click the <i><b>Login</b></i><b> </b>button.</p>

<h2 id="home-page">Home Page</h2>

<p>Once you successfully&nbsp;connect to a CUBRID database, you will see the&nbsp;<i>Home</i> page.</p>

<p class="center"><img width="602" height="263" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image002.jpg" alt="WebQuery Home Page" editor_component="image_link"/></p>

<p>The application interface is divided into 4 main areas:</p>

<h3>Top Menu</h3>

<ul>
<li>Browse</li>
<li>Structure</li>
<li>Query</li>
<li>Import / Export</li>
<li>Create</li>
</ul>

<p></p>
<h3>Left-side Menu</h3>

<p>Allows accessing to the same functionality as the top-menu, but at the database level.</p>

<h3>Left-side Database Structure Browser</h3>

<p>Displays the objects in the database (tables and views) in the form of a tree view.</p>

<h3>Main Content Area</h3>

<p>When a user selects various menus or functions from the menus, this is where the details will being displayed.</p>

<p>The <b>general rule</b>&nbsp;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).</p>

<p>For example, if a user clicks on the database name “<b>demodb</b>” on the left-side menu (database structure browser area), the database structure will be displayed on the main contents area as shown below.</p>

<p class="center"><img width="602" height="386" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image003.jpg" alt="'demodb' database structure" editor_component="image_link"/></p>

<h2 id="browse">Browse Structure</h2>

<p>CUBRID WebQuery makes it easy to browse the database tables and views. On the left side of the application window (in the <b>database structure browser</b> 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.</p>

<p class="center"><img width="215" height="350" alt="Database Structure" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image005.png" editor_component="image_link"/></p>

<p>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.</p>

<p class="important">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).</p>

<p>Select the <b>"nation"</b> table form the left database structure browser and click on the top menu “<i>Browse</i>” item to SELECT the records from that table (or from the view, if a view is selected instead).</p>

<p class="center"><img width="602" height="311" alt="Browse a Table" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image004.jpg" editor_component="image_link"/></p>

<h2 id="create-alter">Create and Alter Database Objects</h2>

<p>With <b>CUBRID WebQuery</b> 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 <b>Create objects</b> on the left-side menu or <b>Create</b> button from the top menu:</p>

<p class="center"><img width="577" height="489" alt="Create Objects" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image006.png" editor_component="image_link"/></p>

<p>There is a built-in support for creating the following objects:</p>

<ul>
<li>Tables</li>
<li>Views</li>
<li>Serials</li>
</ul>

<p>You can also access the “<b>Alter</b>” functionality from the database browser area. When viewing a table structure, click on the <b>“Structure”</b> menu item:</p>

<p class="center"><img width="602" height="450" alt="Alter Objects" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image007.jpg" editor_component="image_link"/></p>

<h2 id="view-insert">View, Insert, Update and Delete Data</h2>

<p>To <b>see the information</b> about a particular Table or View record, select the record and click the <img width="10" height="12" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image008.png" alt="View Record Information" editor_component="image_link"/> button as shown in the image below.</p>

<p class="center"><img width="602" height="363" alt="View Record Information" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image009.jpg" editor_component="image_link"/></p>

<p>To <b>insert new records</b> or <b>update the existing ones</b>, select the row(s) necessary to edit then click the “<b>Edit</b>” link.</p>

<p class="center"><img width="297" height="405" alt="Edit Records" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image010.jpg" editor_component="image_link"/></p>

<p>To <b>delete records</b> select them and click the “<b>Delete</b>” item. You will be asked to confirm the operation:</p>

<p class="center"><img width="602" height="323" alt="Delete Records" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image011.jpg" editor_component="image_link"/></p>

<h2 id="execute-sql">Execute SQL Statements</h2>

<p>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 <b>“Query”</b> menu item, which will lead to the following page:</p>

<p class="center"><img width="602" height="332" alt="Execute SQL Statements" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image012.jpg" editor_component="image_link"/></p>

<p>In the results grid which holds the SQL statement execution results user can perform the following actions:</p>

<ul>
<li>Resize the columns</li>
<li>Sort (click on the columns header)</li>
<li>Navigate to another “page” of results</li>
</ul>

<p>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 <b>“Paste SQL code template”</b>.</p>

<p class="center"><img width="602" height="333" alt="Paste SQL Code Template" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image013.png" editor_component="image_link"/></p>

<p class="important">Tip: You can execute not only SELECT statements, but any other SQL statement, like INSERT, UPDATE, CREATE etc.</p>

<h2 id="import-export">Import and Export data</h2>

<p>To export or import data from/to CUBRID, click on the “<b>Import</b>” or “<b>Export</b>” menu items.</p>

<h3>Import page:</h3>

<p class="center"><img width="602" height="347" alt="Import Data" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image014.jpg" editor_component="image_link"/></p>

<h3>Export page:</h3>

<p class="center"><img width="595" height="466" alt="Export Data" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image015.png" editor_component="image_link"/></p>

<p>As you can see from the above screenshots, one can export or import data using one of the following data formats:</p>

<ul>
<li>SQL Statements</li>
<li>CSV</li>
</ul>

<p>You can also choose to export or import only the database structure, without the data in the tables.</p>

<p>For the export destination, you can choose the <b>Browser</b> option or the <b>Text file</b>. If <b>Browser</b> 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 <b>Text File</b> is chosen the data will be saved to a file.</p>

<p class="important">Remember to indicate a location where CUBRID WebQuery has the write-permission to create a file.</p>

<p>Below is an example of the displayed export results when choosing the <b>Browser</b> as the export destination.</p>

<p class="center"><img width="602" height="318" alt="Export to a Browser" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image016.jpg" editor_component="image_link"/></p>

<h2 id="database-users">Database Users</h2>

<p>When selecting <b>“Database Users”</b> from the left side menu, a list of CUBRID database users will be displayed.</p>

<p class="center"><img width="319" height="207" alt="Database Users" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image017.png" editor_component="image_link"/></p>

<p>In order to view the detailed user rights, select a user and click the “<b>View selected users privileges</b>” link which will display the following page.</p>

<p class="center"><img border="0" width="602" height="258" alt="User Privileges" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image018.jpg" editor_component="image_link"/></p>

<h2 id="error-handling">Error Handling</h2>

<p><b>CUBRDI WebQuery</b> 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.</p>

<p class="center"><img width="602" height="310" alt="Handling Error Messages" src="http://www.cubrid.org/files/attach/images/tutorials/cubrid_web_query/image019.png" editor_component="image_link"/></p>

<h2 id="advanced-configurations">Advanced Configuration</h2>

<p>To change some of the advanced configuration values such as:</p>

<ul>
<li>Auto-update check</li>
<li>Gzip web server support</li>
<li>The number of records displayed per page,</li>
</ul>

<p>... edit the “<b>config.php</b>” file located in the root of CUBRID WebQuery directory. Then restart the application.</p>

<p class="important">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!</p>

<h2 id="other">Other Sweet Features Left for a User</h2>

<p>There are other interesting features in <b>CUBRID WebQuery</b> which allows users to increase the speed of database management. Here are some of them:</p>

<ul>
<li>Easy keyboard shortcuts</li>
<li>Multiple rows editing</li>
<li>Themes support</li>
<li>and others…</li>
</ul>

<h2 id="see-also">See also</h2>

<ul>
<li><a href="http://blog.cubrid.org/cubrid-videos/sql-buddy-for-cubrid-video-tutorial/" target="_self">SQL Buddy for CUBRID</a> - Video Tutorial</li>
<li><a href="/about_cubrid_web_query" target="_self">CUBRID WebQuery</a> - Home page</li>
</ul>

<p></p>

<h2 id="getting-help">Getting Help</h2>

<p>If you have any difficulties with CUBRID WebQuery, post your questions to the dedicated forum at</p>

</div>]]></description>
                        <pubDate>Mon, 18 Oct 2010 16:46:53 -0800</pubDate>
                                </item>
            </channel>
</rss>
